views:

83

answers:

1

The .Net C# offers two (well four) constructors:

Regex(String) 
Regex(String,RegexOptions)

The first constructs a regular expression with default options, while the second gives you somewhat more control. Take a peak under the hood with Reflector shows that the first constructor calls the second with a RegexOptions.None as second parameter. MSDN documentation doesn't reveal much more.

What are the true default options when using the first constructor? is it compiled? is it case sensitive etc.

+1  A: 

It's equivalent to using RegexOptions.None - it's not compiled, it's case-sensitive, etc. (Basically look at RegexOptions, and it's the opposite of selecting them :)

Jon Skeet