Results 1 to 5 of 5
Thread: Regex Help - Multi-line matching
Jun 27, 2007, 11:33 #1
- Join Date
- Oct 2003
- 0 Post(s)
- 0 Thread(s)
Regex Help - Multi-line matching
I'm trying to write a regular expression that will match everything between to tags, including new lines, but not in a 'greedy' way.
i.e. I'd like to match everything between [lsit] and [/lsit] and capture everything between those tags.
e.g. If this is my haystack:
This is a list ... [lsit] a bunch of text that spans several lines [/lsit]
a bunch of text that spans several lines
But I can't figure out how to match new lines. I first remove all \r characters from my haystack then I look for \n characters but they don't seem to match.
Can anyone offer any suggestions?
BTW I added some typos to my spelling of 'list' so that the forum would not try to replace them.s21825