Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Match and Extract String with Regex

by lima1 (Curate)
on Nov 17, 2007 at 10:13 UTC ( [id://651398]=note: print w/replies, xml ) Need Help??


in reply to Match and Extract String with Regex

If you just want to extract the TAIR id, you could use this regex:
my ($tair_id) = $str2 =~ /(AT\dG\d{5})/i;
If you want to fetch the alternative splice form suffixes as well (e.g. AT1G71260.1), you could use:
my ($tair_id) = $str2 =~ /(AT\dG\d{5}(?:\.\d+)?)/i;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found