Oolankaloophid has asked for the wisdom of the Perl Monks concerning the following question:
Trying to write a regex to NOT match line 1 but will match line 2 and 3. The string will not be anchored.
9759-222-sdfgh1-001-aaa-1234-abc
8898-222-sdfgh1-001-aaa-1234-abc
1234-222-sdfgh1-001-aaa-1234-abc
My regex is:
(?<!9759-222)(\w\- {24})
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PCRE help with negative match
by toolic (Bishop) on Aug 11, 2013 at 00:28 UTC | |
by Oolankaloophid (Initiate) on Aug 11, 2013 at 00:46 UTC | |
|
Re: PCRE help with negative match
by 2teez (Vicar) on Aug 11, 2013 at 00:28 UTC | |
by Oolankaloophid (Initiate) on Aug 11, 2013 at 00:45 UTC | |
by Laurent_R (Canon) on Aug 11, 2013 at 09:23 UTC | |
by Anonymous Monk on Aug 11, 2013 at 11:06 UTC | |
|
Re: PCRE help with negative match
by locked_user sundialsvc4 (Abbot) on Aug 13, 2013 at 04:30 UTC |