in reply to Finding specific alphanumeric IDs from the string

If you know that the identifier always begins with CWG and thereafter consists of zero-or-more alphanumerics, write a regex that looks for i"(comma?) .. CWG .. alphanumeric."/i Use the "/g" modifier to allow the regex to be used more than once in the same string. If you know that CWG never occurs at the start of the string, the comma is merely part of the leading string that you are looking for. Do not try to remove characters first since this disrupts the structure of the string and introduces the possibility for errors.

  • Comment on Re: Finding specific alphanumeric IDs from the string

Replies are listed 'Best First'.
Re^2: Finding specific alphanumeric IDs from the string
by Anonymous Monk on May 24, 2012 at 18:58 UTC
    Hello,
    Thanks for replying but even I am trying to find some common pattern in my data... I have got into thinking if there is some reverse method of attacking this problem where data is so unpredictable.