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;