Perl syntax blindness
Posted: Thu Apr 16, 2009 11:17 pm
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?
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?