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?


8 Years
Discussion Span
Last Post by cheapterp

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.