in reply to Smart match & substitution

... smart match ... substitution ...

Its called "smart match" not substitution

There is no "smart" subsitution

http://perldoc.perl.org/perlrequick.html#Search-and-replace

  • Comment on Re: Smart match & substitution (matching isn't substitution)

Replies are listed 'Best First'.
Re^2: Smart match & substitution (matching isn't substitution)
by Anonymous Monk on Feb 09, 2015 at 11:10 UTC
Re^2: Smart match & substitution (matching isn't substitution)
by OceanPerl (Initiate) on Feb 09, 2015 at 09:24 UTC
    Anonymous Monk, You're not really answering my question other than telling me my thinking is wrong. I clearly asked what the best way to do bulk-pattern substitution is. If "smart match" is not the correct thinking, then please, feel free to elaborate on what the best way is... ;-)
      Are these the real regexes you want to "parallelize"?

      Step one (a): use one regex with a [char-class] with '\ and so on

      Step one (b): combine others with or-clauses in your regex (A|B)

      Step two: process more than one line at a time by joining them together.

      Cheers Rolf

      PS: Je suis Charlie!

      update

      added (one b)

      Anonymous Monk, You're not really answering my question other than telling me my thinking is wrong. I clearly asked what the best way to do bulk-pattern substitution is. If "smart match" is not the correct thinking, then please, feel free to elaborate on what the best way is... ;-)

      Lets, see , match operator matches, substitution operator substitutes ... understanding that one is apples and the other is oranges, even if they're both food, is very very important

      You've used a sufficient amount of "invented" vocabulary, so I gave you the answer in the form of a link

      but, you failed my litmus test, you didn't read the link I gave you, you didn't find the syntax you're looking for,

      so, we're at the point of waiting for you to read my link , and ask a question about it