View Single Post
Old 02-15-2010, 10:00 PM   #6
tyche
Addict
tyche plays well with otherstyche plays well with otherstyche plays well with otherstyche plays well with otherstyche plays well with otherstyche plays well with otherstyche plays well with otherstyche plays well with otherstyche plays well with otherstyche plays well with otherstyche plays well with others
 
Posts: 227
Karma: 2530
Join Date: Dec 2009
Device: PRS-505, iPad
I use MS Word so someone might be able to help better with BD's regex implementation. I admit I'm not very good with regex just some simple things but it's very powerful once you master it. Page numbers are just trying to find a pattern. it there isn't one that won't conflict with the numbers in the book you have a harder time. But it can be used to step through faster than scrolling.

You can also look out for font types or size changes and catch them that way - at least in Word I can not sure about BD. ie. It might have been a footer than now is in the main text but it is still 10pt instead 12pt and I'll just replace all 10pt font with a blank.

It's best to just try simple queries until you are confident it's doing what you think. In my examples in MS Word it uses ^13 for a return instead of \n or \r

^13([a-z])

The items in parenthesis become a variable you can use in the replace line. So the replace like would be " \1" without the quotes to add a space instead of a carriage return and then replace the first found letter back - you can have multiple variables per find line. This would attach a line like

The quick brown fox jumped over
the lazy dog.


The second example would be

([a-zA-Z])^13

which I would use "\1 " without the quotes as the replace line.

This would find:

Mark sat on the bench and asked
Tony what the time was.
tyche is offline   Reply With Quote