Quack
asked on
my regular expressions isnt' working...need one for a POC form field that can include alphabetic characters [commas] [periods] and [spaces]
my regular expressions isnt' working...need one for a POC form field that can include alphabetic characters [commas] [periods] and [spaces]
current regex is:
throwing an invalid message though when John Doe Test2 is used...anyone have any ideas?
current regex is:
, Contact_POC: {
required: true
, pattern: /^[a-zA-Z0-9,-.!? ]*$/
}
throwing an invalid message though when John Doe Test2 is used...anyone have any ideas?
Note you're also allowing question marks and exclamation marks with the provided pattern, as well as hyphens, and the other character you did say you wanted.
ASKER
The Point of Contact Name can include alphabetic characters, commas, periods, and spaces
ASKER
I didn't need the question mark but its still not taking for some reason w/ the hyphen moved...I think its failing on the space...how do I add a space?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
that took...thanks!
Looks like sth went wrong with choosing the correct comment for the points ?
ASKER
worked great...sorry for the confusion
Open in new window
It says match any character between comma and period. Did you want to match a hyphen? If so, put the hyphen at the start or end of the list of characters to match. eg
Open in new window