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
In reply to Re: replace at the begining
by Melly
in thread replace at the begining
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |