in reply to Re^2: avoiding a particular character or set of characters
in thread avoiding a particular character or set of characters
Hi neeha, you cannot use character class here, rather you have to use negative look head.
change
into
$str ="$str ="check this out check this here";"; $str =~ s#check this ((?!out).)+#check this one#gs; print $str;
Prasad
|
|---|