I have a bunch of alphanumeric IDs for the data in my DB. The IDs may look like the foll:
0XAA001 or 1YBB010 or 2ZCC011 and so on.

Each of the 7 characters stands for something and therefore I have to extract the characters to populate the columns in the DB. I was able to use the REFind function (with the ^ special character) to grab the first 2 characters.

Extracting the subsequent characters is giving me trouble. What I want to do next is extract the 3rd and 4th characters (simultaneously) and do a comparison. Based on whether the pair is AA or BB etc, I have to populate a column in the DB.

How do I pull out the remaining characters - two at a time?

TIA!

Why do you need regex for this? Can you not use basic string functions like LEFT, MID, and RIGHT?

Thanks buddylee17,
I am not sure why I did not think of those functions! :-O

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.