Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Tri state string compare?

by mr_ron (Chaplain)
on Dec 14, 2015 at 16:09 UTC ( [id://1150236]=note: print w/replies, xml ) Need Help??


in reply to Re: Tri state string compare?
in thread Tri state string compare? (Solved! see update2)

Just a variant that takes the rules of the original question a little more literally and strictly ...

use strict; use warnings; my $abc = "AABCBAABCCCCAB"; my $ab = "AABABAABABABAB"; $abc =~ s/C/[AB]/g; $abc = qr/^$abc$/; print "They match!\n" if $ab =~ $abc;
Ron

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found