jsnewbie
06-23-2008, 12:08 PM
Hi all,
As a newbie am learning and finding it a bit difficult with the regular expression section in JavaScript. I am looking for a regular expression which checks a string, for finding any characters other than A-Z a-z 0-9 _ and - (plz note that no space characters are allowed).
The following strings are valid in my criteria:
This-is-a-test
This_is_a_test
This_is_a_test_900
9this_is-atest098
The following string are invalid
This is
This*
This_test_$5
I hope you understand my question and help with me with the required regular expression in JavaScript.
Thanks a lot for your help
Regards
Thomas
As a newbie am learning and finding it a bit difficult with the regular expression section in JavaScript. I am looking for a regular expression which checks a string, for finding any characters other than A-Z a-z 0-9 _ and - (plz note that no space characters are allowed).
The following strings are valid in my criteria:
This-is-a-test
This_is_a_test
This_is_a_test_900
9this_is-atest098
The following string are invalid
This is
This*
This_test_$5
I hope you understand my question and help with me with the required regular expression in JavaScript.
Thanks a lot for your help
Regards
Thomas