in reply to replace at the begining
The easiest way is to use a negative class (as noted below by others, this will only work when the error isn't the first thing on the line).
s/[^<]p\sclass=/<p\sclass=/;
Alternatively, use a negative look-behind - (?<!foo):
s/(?<!<)p\sclass=/<p class=/;
Fixed the code - no \s as a replacement
Tom Melly, pm (at) cursingmaggot (stop) co (stop) ukmap{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: replace at the begining
by $self (Friar) on Aug 20, 2009 at 11:39 UTC | |
|
Re^2: replace at the begining
by Taulmarill (Deacon) on Aug 20, 2009 at 11:32 UTC | |
|
Re^2: replace at the begining
by Anonymous Monk on Aug 20, 2009 at 11:07 UTC | |
by Melly (Chaplain) on Aug 20, 2009 at 11:37 UTC |