in reply to Re: Match pattern per line and after another one as multiline in single file opening
in thread Match pattern per line and after another one as multiline in single file opening

I read the description as he needs the [^}] to match through newlines, and so there needs to be a slurp before the regex. But your point about lack of test data is very appropriate.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

  • Comment on Re^2: Match pattern per line and after another one as multiline in single file opening
  • Download Code

Replies are listed 'Best First'.
Re^3: Match pattern per line and after another one as multiline in single file opening
by Laurent_R (Canon) on Feb 15, 2017 at 07:20 UTC
    Yeah, I may have missed or overlooked the sentence about multiline match and I really wondered why the OP code was localizing $/, but given that the OP speaks about a config file and given the regexes used for matching the data, I am still not really convinced that there is an actual need for multiline match.

    But it's impossible to say either way without the input data.