T
Trans
Regexp help. How do I write "all non-alphanumeric characets except .
(period) - (dash) and _ (underscore)"
Thanks,
T.
(period) - (dash) and _ (underscore)"
Thanks,
T.
Regexp help. How do I write "all non-alphanumeric characets except .
(period) - (dash) and _ (underscore)"
Regexp help. How do I write "all non-alphanumeric characets except .
(period) - (dash) and _ (underscore)"
Regexp help. How do I write "all non-alphanumeric characets except .
(period) - (dash) and _ (underscore)"
re = %r/[^A-Za-z0-9._-]/
or depending on usage, you may want
re = %r/^\s*[^A-Za-z0-9._-]\s*$/
or something close
David said:Just negate the things you don't want (with _ being subsumed in \w):
/[^\w.-]/
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.