
13 Apr
2006
13 Apr
'06
5:03 p.m.
In the (^([a-z]:\\?) I want to make the last \ optionnal not to have a literal ?.
Should I change this to: "(^([a-z]:\\\?)" ?
The the one thing you should not do :-) If the string is embedded in your program as a string literal, then the compiler will replace each \\ with \ before regex sees it, so "\\?" matches a literal "?" and "\\\\?" is an optional backslash. Of course all your other backslashes may need doubling up as well if you intend them to be literal backslashes rather than regex-escapes :-) John.