This is PerlMonks "Mobile"

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


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.