View Single Post
Old 12-12-2008, 01:25 PM   #15
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by daesdaemar View Post
OK, I played with it a bit. But it didn't work well. I found that it would find the instances of "nn John Smith" where "nn" is the page number, but it actually "found" ALL the text prior to the page number until it found another number in the preceding paragraph. Obviously, in some cases it was finding and replacing many lines of text. This is very puzzling, but I feel like I am making some headway...
Yes, you have to be careful with regular expression. Sometimes they will match stuff you didn't expect. You can also put a ^ at the beginning of the expression and that tells it to only match the expression when it starts with it on a line. That may work better since I assume the footers are all on their own line.

I use a free tool called "The regulator" to write and test my regexs. However, as you have found the word syntax is a bit relaxed vs the parser that the regulator uses.

I would just say click on Find Next all the way through to be sure it is matching what you want before you go crazy.

BOb
pilotbob is offline   Reply With Quote