Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: how can I combine these expressions?

by plaid (Chaplain)
on Jul 27, 2000 at 03:27 UTC ( #24598=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $str =~ s/(^|[^\%](?:\%\%)*)\%
              (\{)?                  # Match and capture 1 or 0 braces
              ([_a-zA-Z]\w*)
              (?(2)\})               # If there's anything in $2, match en
    +ding brace
              /"$1".$env->{$3}/gex;  # $3 now instead of $2 here
    
  2. or download this
    (?(condition)yes-pattern|no-pattern)
    (?(condition)yes-pattern)
    ...
    
    matches a chunk of non-parentheses, possibly included
    in parentheses themselves.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2022-05-23 17:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?