Berkeley CSUA MOTD:Entry 17845
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/25 [General] UID:1000 Activity:popular
5/25    

2000/3/24-25 [Computer/SW/Languages/Perl] UID:17845 Activity:moderate
3/24    Can you have nested parenthesis in perl regular expressions?
        If so, what is the rule for assigning the corresponding $d variables?
        \_ Yes: you count open parens.  So in /(foo(bar))/, $1 is "foobar"
           and $2 = "bar".
        \_ no.
           \_ yes.
              \_ xor.
        \_ Why don't you post the code and what you _think_ it should do and
           maybe you'll get a real answer.  Perl being perl, your question can
           be interpreted in more than one way.