Here is my regex:
\[\[START\]\]\[\[OK\]\](.*?)\[\[END\]\]
I want to get any text contained in [[START]][[OK]]
and [[END]]
.
However when my text contains some \r\n
characters, my regex doesn't match it.
How can it make it work?
Use single-line mode
http://msdn.microsoft.com/en-us/library/yd1hzczs.aspx#Singleline
I don't know for sure if this works for RegEx'es as well,but you could try using Environment.NewLine in stead of \r\n.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.