How about this?
#! perl use strict; use warnings; my $s = 'XYX_WT_7_25h_Trimmed_75.SAM'; print $1 if $s =~ / ( _ [^_]+ _ [^_]+ ) $ /x;
Output:
23:31 >perl 1687_SoPW.pl _Trimmed_75.SAM 23:32 >
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Matching all text after a specific character
by Athanasius
in thread Matching all text after a specific character
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |