Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Match pattern per line and after another one as multiline in single file opening

by kennethk (Abbot)
on Feb 14, 2017 at 23:33 UTC ( [id://1182031]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1182031]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found