Use this to test them out and find for your self..
http://www.gskinner.com/RegExr/
(not mine or affiliated .. just a great tool)
Gaby
2010-01-29 15:28:56
Use this to test them out and find for your self..
http://www.gskinner.com/RegExr/
(not mine or affiliated .. just a great tool)
Two of the choices match all strings consisting only of alphanumeric characters. Neither of those match only strings consisting of alphanumeric characters.
One of the other two matches some, but not all, strings consisting of only alphanumeric characters.
The other matches strings beginning with a particular string which include the dash character, which precludes matching only alphanumeric strings.
A pattern matching only nonempty strings of alphanumeric characters includes the following: /\A[a-zA-Z0-9]+\z/