Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a set of file-names in this format:
XYX_WT_7_25h_Trimmed_75.SAMAnd I want to match the second to last _ and all text after it (_Trimmed_75.SAM). Ordinarily I would use:
/_[^_]+$/To grab everything after the final _ but being new to Perl i'm not sure how I would do this for the second to last. Any help would be much appreciated!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching all text after a specific character
by Athanasius (Archbishop) on Aug 24, 2016 at 13:30 UTC | |
|
Re: Matching all text after a specific character
by Anonymous Monk on Aug 24, 2016 at 14:36 UTC |