View Single Post
Old 12-27-2009, 06:25 PM   #11
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Generally, in regex, anything enclosed in parentheses () are stored for replacement. In your replace field, you put \1 for the first set of parentheses, \2 for the second, etc.

So:

Code:
Find: The Book, Chapter ([0-9]+):([^\n]+)
Replace: <h2>Chapter \1 -- \2</h2>
would find The Book, Chapter 17: The End of Mayonnaise
and replace it with
<h2>Chapter 17 -- The End of Mayonnaise</h2>.

m a r
rogue_ronin is offline