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

Re^2: Compiling Regular Expressions

by johndeighan (Novice)
on Mar 11, 2016 at 16:05 UTC ( #1157455=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $kind;
    my $REGEX  = qr/
    ...
            | \x27 ( (?:[^\x27] | \x27{2})* ) \x27 (?{$kind = 'STRING';})
            | \S                                   (?{$kind = 'OTHER';})
            /xs;
    
  2. or download this
    my $IDENT  = qr/ [A-Za-z][\w]*                        /xs;
    my $STRING = qr/ \x27 ( (?:[^\x27] | \x27{2})* ) \x27 /xs;
    ...
            | $STRING   (?{$kind = 'STRING';})
            | \S        (?{$kind = 'OTHER';})
            /xs;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2021-12-06 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (32 votes). Check out past polls.

    Notices?