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?
Perl syntax blindness
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Perl syntax blindness
You need to force the perl pattern to grab all numerics - not just the first like this:
\d{1,3}?
Alternatively you can set the greediness option under the [...] button next to the search type drop-down
\d{1,3}?
Alternatively you can set the greediness option under the [...] button next to the search type drop-down