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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Substitute strings
by Athanasius (Archbishop) on Sep 12, 2016 at 09:30 UTC | |
by kepler (Scribe) on Sep 14, 2016 at 22:10 UTC | |
|
Re: Substitute strings
by marto (Cardinal) on Sep 12, 2016 at 09:12 UTC | |
by kepler (Scribe) on Sep 12, 2016 at 09:39 UTC | |
by AnomalousMonk (Archbishop) on Sep 12, 2016 at 17:51 UTC | |
|
Re: Substitute strings
by clueless newbie (Curate) on Sep 12, 2016 at 12:20 UTC | |
by AnomalousMonk (Archbishop) on Sep 12, 2016 at 18:00 UTC |