We don't bite newbies here... much | |
PerlMonks |
Substitute stringsby kepler (Scribe) |
on Sep 12, 2016 at 08:56 UTC ( [id://1171568]=perlquestion: print w/replies, xml ) | Need Help?? |
kepler has asked for the wisdom of the Perl Monks concerning the following question: Hi I have a rather simple question: after loading an entire file into a string (with file slurp), I want to substitute all expressions of type func1(x, "text %f and %f...", "hello") for the exception of some of the type func1(x, "%f", "hello"). I'm trying $data =~ s/func1(x, \"[^%](.*)/text/gi; But some of the first type are not being substituted (I think because of the wrong place of [^%]. Any help is apreciated. Kind regards, Kepler
Back to
Seekers of Perl Wisdom
|
|