Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Regular expression for a comma separated string

by Loops (Curate)
on Nov 23, 2014 at 23:43 UTC ( [id://1108196]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @tst = qw(   A,G AG,CT TC,CA GAT,CGA CGAT,TG ,G
                    ACGT X,A AA,G AC,GGC ATGA,TGG ATCXG,AAC
    ...
            my $side = qr/(?:([ACGT])(?![^,]*\g{-1}))+/;
            print $_ . (/^$side,$side$/ ? ' good' : ' bad') . $/;
    }
    
  2. or download this
    A,G good
    AG,CT good
    ...
    AC,GGC bad
    ATGA,TGG bad
    ATCXG,AAC bad
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found