zeusdeux / re2

Automatically exported from code.google.com/p/re2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

dot_nl Option missing #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The Options class doesn't allow one to change the ,,Allow . to match newline'' 
flags of the Regex class. It can be overriden per regex by wrapping it in 
something like (?s:<any_regex>), but it's more convenient to set it via an 
option (and a bit faster too, I guess).

Revision: 401ab4168e8e  Aug 21, 2012
Operating system: any

Original issue reported on code.google.com by pklem...@gmail.com on 25 Sep 2012 at 1:23

GoogleCodeExporter commented 9 years ago
I suggest using "(?s)" + re as your regexp. You won't notice the speed 
difference, and the reader of the code doesn't have to learn both what (?s) 
mean and what the corresponding Options tweak is. The settings in the options 
are really only there if you're using POSIX mode, where there is no syntax for 
editing flags, and most people don't use it. I'll leave this open for the POSIX 
mode people.

Original comment by rsc@golang.org on 25 Sep 2012 at 1:39

GoogleCodeExporter commented 9 years ago
This issue was closed by revision d4b3de58cdae.

Original comment by rsc@golang.org on 10 Jan 2014 at 2:44