|| at Nov 6, 2014 at 8:37 am
On Thu, Nov 6, 2014 at 9:31 AM, Bicen Zhu wrote:
Any option in golang regexp like the singleline mode in .Net, which can
change the means of "." as any char including the "\n" ?
Use the s flag defined at http://golang.org/pkg/regexp/syntax/
(re) numbered capturing group (submatch)
(?P<name>re) named & numbered capturing group (submatch)
(?:re) non-capturing group (submatch)
(?flags) set flags within current group; non-capturing
(?flags:re) set flags during re; non-capturing
Flag syntax is xyz (set) or -xyz (clear) or xy-z (set xy, clear z).
The flags are:
i case-insensitive (default false)
m multi-line mode: ^ and $ match begin/end line in
addition to begin/end text (default false)
s let . match \n (default false)
U ungreedy: swap meaning of x* and x*?, x+ and x+?, etc
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.