Perl syntax blindness

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
dgcuff
Posts: 4
Joined: Fri Mar 20, 2009 1:43 am

Perl syntax blindness

Post 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?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Perl syntax blindness

Post by DataMystic Support »

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
Post Reply