OK - I have a list of customer names from a database query.
For my immediate goal, I only need the first three (3) alphanumerics (A-Za-z0-9). I can exclude ALL other characters that may appear...
Smith Co. (would want "SMI")
A-B-C Co. (would want "ABC")
U_US INC. (would want "UUS")
I need to match the first three alphanumerics of the company name from database "A" to the first three alphanumerics of the company name from database "B". If they match, do "this", if they don't do "that"
After searching I think that I found something that works, but want to make sure that there are no wholes in my theory...
Code Snippets:
Database "A"
if ($prod_nm =~ /^([A-Za-z0-9]{3})/){
$prod_nm_substr=$1;
}
Database "B"
if ($fe_customer_name =~ /^([A-Za-z0-9]{3})/){
$fe_customer_name_substr=$1;
}
Thank you for you advice,
Mark
For my immediate goal, I only need the first three (3) alphanumerics (A-Za-z0-9). I can exclude ALL other characters that may appear...
Smith Co. (would want "SMI")
A-B-C Co. (would want "ABC")
U_US INC. (would want "UUS")
I need to match the first three alphanumerics of the company name from database "A" to the first three alphanumerics of the company name from database "B". If they match, do "this", if they don't do "that"
After searching I think that I found something that works, but want to make sure that there are no wholes in my theory...
Code Snippets:
Database "A"
if ($prod_nm =~ /^([A-Za-z0-9]{3})/){
$prod_nm_substr=$1;
}
Database "B"
if ($fe_customer_name =~ /^([A-Za-z0-9]{3})/){
$fe_customer_name_substr=$1;
}
Thank you for you advice,
Mark