Regex question (multi-line)
Posted: Sat Jan 10, 2009 12:51 am
In the Tester, 100 items are shown in the 'Elements Found' window, no matter what the setting is in Options.
In the tester each occurance is a new line, in the TC multiple occurances can be on one line. Could there be an option to show each occurance on a separate line?
How do I find something across multiple lines? I want to find all occurances of brackets including the enclosed text. Sample text:
quote:
Regex test file
for brackets plus contents.
Notes within[Note_1] text, notes at
[Note_2]start or
end of line,[Note_3]
notes by itself on line,
[Note_4]
also[Note_5] multiple[Note_6] notes[Note_7] per line
and finally
[Note_8
over two lines]
or notes over multiple
lines[Note_9 on
three
lines] within text.
un-quote
The best I can come up with is this rather simple regex \[.*?\] which gives me all notes except the two last ones over multiple lines. Any suggestions?
In the tester each occurance is a new line, in the TC multiple occurances can be on one line. Could there be an option to show each occurance on a separate line?
How do I find something across multiple lines? I want to find all occurances of brackets including the enclosed text. Sample text:
quote:
Regex test file
for brackets plus contents.
Notes within[Note_1] text, notes at
[Note_2]start or
end of line,[Note_3]
notes by itself on line,
[Note_4]
also[Note_5] multiple[Note_6] notes[Note_7] per line
and finally
[Note_8
over two lines]
or notes over multiple
lines[Note_9 on
three
lines] within text.
un-quote
The best I can come up with is this rather simple regex \[.*?\] which gives me all notes except the two last ones over multiple lines. Any suggestions?