Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: Matching a string in a parenthesized block (regex help)

by LanX (Saint)
on Mar 06, 2021 at 14:06 UTC ( [id://11129190]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Matching a string in a parenthesized block (regex help)
in thread Matching a string in a parenthesized block (regex help)

> s .*? is searching for any character including the closing brace }.

Yes, that's why I added an alternative.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^5: Matching a string in a parenthesized block (regex help)

Replies are listed 'Best First'.
Re^6: Matching a string in a parenthesized block (regex help)
by maxamillionk (Acolyte) on Mar 06, 2021 at 14:28 UTC

    Thanks I think I got the right regex now, this seems to work

    m/(ASDF_$arg \{)([^}]*?)magic(.*?)(\})/s

    That is exactly what I wanted.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found