maybe you should escape the dots
\.
catwalk
2009-11-05 08:51:43
Problems observed with your regex
1. "." is a meta character in regex. It matches "anything". You should escape it to match the dot. Like this .
2. \w is a character class which includes small letters, caps, numbers and underscore. This explains why "1234" passed.
Try this
^[a-zA-Z]\w*(\.[-\w]+){1,2}$
Use this expression: \w+\S*?\.\w+\S*
I read your definition as:
This ran successfully using .NET RegexOptions.ECMAScript
and RegexOptions.Multiline