Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Precise backreference semantics in Perl regular expressions

by choroba (Cardinal)
on Nov 09, 2023 at 15:21 UTC ( [id://11155510]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for my $regexp (qr/^((a*)b|a*b?d)*c\2$/, qr/^(a*b?d|(a*)b)*c\2$/) {
        for my $string (qw( aabadcaa aababdcaa )) {
            say $string =~ /$regexp/ ? 'Yes' : 'No';
        }
    }
    
  2. or download this
    Yes
    No
    Yes
    Yes
    
  3. or download this
    use re 'debug';
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-05-21 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found