Page 1 of 1

Perl syntax blindness

Posted: Thu Apr 16, 2009 11:17 pm
by dgcuff
I can't see what I'm doing wrong, and need a second pair of eyes to check me.

My find pattern (type perl) is "on page \d{1,3}". My replacement is "on page <pagenum>".

When the text is "on page 333", the result is "on page <pagenum>33".

I would have thought that the find pattern would deal with all cases of "on page 333", "on page 22", and "on page 1", but that's not what happening, and I can't seem to shake my brain out of its preconceptions.

Where amI going wrong?

Re: Perl syntax blindness

Posted: Sat Apr 18, 2009 7:54 pm
by DataMystic Support
You need to force the perl pattern to grab all numerics - not just the first like this:

Alternatively you can set the greediness option under the [...] button next to the search type drop-down