|
-
January 8th, 2013, 10:29 AM
#2
Re: Regular Expressions and Javascript Help needed
Just an FYI. I was able to fix the issue.
document.getElementById("trackingID").value = acctNum.replace(/[^\A-Za-z0-9?*\-\s]/g, "");
The reg exp was using the - as a range instead of a literal. I \-\s at the end and it is keeping the spaces as well as the dash.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|