Walter (Phobos): RegExp and dotmatchlf

Unknown W. Brackets unknown at simplemachines.org
Sat May 5 13:12:44 PDT 2007


Really?  It seems to be available many places:

Perl uses it, as I mentioned:
http://perldoc.perl.org/perlre.html#DESCRIPTION

.NET uses it too:
http://msdn2.microsoft.com/en-us/library/yd1hzczs.aspx

And of course, PCRE which allows the modifier ?s as well.  But it, like 
Java, uses it as an int constant in a bitfield flag or similar.

Boost calls it "mod_s" for obvious reasons:
http://www.boost.org/libs/regex/doc/syntax_option_type.html#Table5

JavaScript/ECMAScript notably does not support it.

But, XSLT 2.0/XPath 2.0 do include a recommendation for its support:
http://www.w3.org/TR/xslt20/#regular-expressions
http://www.w3.org/TR/xpath-functions/#flags

I would suggest that you wouldn't be in danger of exploring new 
territory if you considered this as a flag.

-[Unknown]


> Unknown W. Brackets wrote:
>> Well, in PCRE you use something like this:
>>
>> ~a(.+)b~s
>>
>> Where s is also known as "dotall".  So, why not add it as a flag in 
>> the constructor?  I'm pretty sure I've seen it used outside Perl too.
> 
> I've never seen it as a regex constructor flag. Regexes are standardized 
> enough I am very reluctant to create a unique variant.



More information about the Digitalmars-d mailing list