Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Match and Extract String with Regex

by lima1 (Curate)
on Nov 17, 2007 at 10:13 UTC ( #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
Node Status?
node history
Node Type: note [id://651398]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2021-04-15 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?