in reply to Substitution don't work with a special inputfile
Your second file seems to have line breaks ("\n") in the middle of the {[%tqu...]} strings, and the dot does not match this character unless you use the /s modifier. Try s/$regex/$subst/sgi; instead
Edit: except .* with /s will be far too greedy. [^]]* or .*? would work better
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Substitution don't work with a special inputfile
by OldChamp (Acolyte) on Aug 24, 2015 at 15:41 UTC | |
by Eily (Monsignor) on Aug 24, 2015 at 15:45 UTC | |
by OldChamp (Acolyte) on Aug 24, 2015 at 16:42 UTC | |
by AnomalousMonk (Archbishop) on Aug 24, 2015 at 17:11 UTC | |
by Eily (Monsignor) on Aug 24, 2015 at 17:11 UTC |