View Single Post
Old 12-19-2010, 11:56 AM   #3
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
That's one way to do it, the regex will then match either the subexpression on the left side of the pipe or the one on the right side. You could also use something like
Code:
<b>Page\s+\d+</b><br>\s+<hr>
which will match the whitespaces that make up the linebreak. Another way to do it would be
Code:
(?s)<b>Page\s+\d+</b><br>.+?<hr>
which uses a flag to tell the dot wildcard to match anything including newlines and then uses a dot to match the newline.
Manichean is offline   Reply With Quote