in reply to my substitution problem:
Well on the second substitution it is clearly able to match "0+" after a 1. Well does that fit the rule? Why yes, the preceeding "1" is not "^", so it can match What to do? Why deny it a digit there. That gives us:
which does what you asked.s/(?<![\^\d])(?:\d+\+)//g; # ^^^^^^ <- was just \^ before
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: my substitution problem:
by Madams (Pilgrim) on Feb 13, 2001 at 08:11 UTC |