cspctec has asked for the wisdom of the Perl Monks concerning the following question:
odm_trs84t1cb1
But does not match this (only match when 'cb' is together):odm_trs84t1b01
So far, I have created this regex:[A-Za-z_-]+\d{1,3}[lt]\d[bcfmrtw]+\d+
But it matches both strings. I have been investigating positive lookbehind, but I haven't gotten it to work on regexpal.comI would appreciate some help
Thanks for the help everyone... this regex seems to work:
[A-Za-z_-]+\d{1,3}[lt]\d(cb|m)\d+
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex letter order matching
by hippo (Archbishop) on Mar 25, 2014 at 22:39 UTC | |
|
Re: Regex letter order matching
by Anonymous Monk on Mar 25, 2014 at 22:17 UTC | |
by Anonymous Monk on Mar 25, 2014 at 22:28 UTC | |
|
Re: Regex letter order matching
by mtmcc (Hermit) on Mar 26, 2014 at 14:59 UTC |