Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello everyone,
I am writing a regression tool and require to match error in written ids within the strings. Following instances would make it clearer:
Required syntax is comma separated ids.
Ids should be expected in any form like this:
123
123456,34567889
12345,CWG123456,1234
(i.e. a numeric string with more than 3 digits or alphanumeric string starting with CWG only)
Classes of Errors observed by me in the string for pattern matching can be of following scenarios:
1) "Blah Blah 10-20 m can be taken into consideration 1234556"
2) 123,30,40
3) http://www.takeithere.com/123456789/fig1,987643,34467889
According to my pattern it removes all the metacharacters found in the coming string and joins 10-20 into 1020 which is more than 3 digits and considers this to be an id. Can you please provide me with an idea to screen Ids in required format only otherwise display error specifically for the ones which do not have proper syntax.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding specific alphanumeric IDs from the string
by Grimy (Pilgrim) on May 21, 2012 at 08:53 UTC | |
by Anonymous Monk on May 21, 2012 at 16:34 UTC | |
by Grimy (Pilgrim) on May 21, 2012 at 20:09 UTC | |
by Anonymous Monk on May 24, 2012 at 18:52 UTC | |
by Anonymous Monk on May 22, 2012 at 03:19 UTC | |
|
Re: Finding specific alphanumeric IDs from the string
by Anonymous Monk on May 23, 2012 at 00:36 UTC | |
by Anonymous Monk on May 24, 2012 at 18:58 UTC |