>In this format:
>
[quoted text clipped - 5 lines]
>Is that how a regex works? It can identify a single space as a character
>to be matched ?
In addition to what Marcus said, be careful when using spaces or other
whitespace in regular expressions. There's a flag in the RegexOptions
enumeration that can be passed in to various methods of the Regex class,
it's called IgnorePatternWhitespace. If this flag is set when the
expression is used, any whitespace in the pattern is not assumed to be
part of the match. Obviously, if you call the Regex method yourself,
you're bound to know whether you're passing that flag or not. But when the
call is made from other code than your own, or you're using a regular
expression tester, it's important to know this when working with
expressions that want to match whitespace.
Oliver Sturm

Signature
Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)