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})/i;
my ($tair_id) = $str2 =~ /(AT\dG\d{5}(?:\.\d+)?)/i;
In reply to Re: Match and Extract String with Regex
by lima1
in thread Match and Extract String with Regex
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |