954,160 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Match Strings using REFind

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!

cheapterp
Light Poster
33 posts since Jun 2008
Reputation Points: 10
Solved Threads: 2
 

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

buddylee17
Practically a Master Poster
697 posts since Nov 2007
Reputation Points: 232
Solved Threads: 137
 

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

cheapterp
Light Poster
33 posts since Jun 2008
Reputation Points: 10
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You