Jump to content

I Hate regex... Need help (Again!)


AV1611

Recommended Posts

[!--quoteo(post=385603:date=Jun 19 2006, 08:12 AM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Jun 19 2006, 08:12 AM) [snapback]385603[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Can't you just run a str_replace("-","",$string) on it beforehand?
[/quote]

Went with this:

[code]

$MFG=$row['MFG'];
$MFGa=str_replace(".","%",$MFG);
$MFGa=str_replace("-","%",$MFGa);
$MFGa=str_replace(" ","%",$MFGa);


$MFG1=$row1['MFG1'];
$MFG1a=str_replace(".","%",$MFG1);
$MFG1a=str_replace("-","%",$MFG1a);
$MFG1a=str_replace(" ","%",$MFG1a);

IF ($MFG1a==$MFGa && $MFG1_PNa==$MFGPNa)
[/code]

This got most of them, but I still have some oddballs that I dont 'know what to do with:

here are some examples if anyone has a suggestions - These are all synonimous<sp?>:

3M
3M CO
3M CO-LF
3M COMPANY
3M SCOTCH
3M/TEXTOOL
3M\SCOTCH
3M-LF

ACCURATE SCREW
ACCURATE SCREW CO.
ACCURATE SCREW MACHINE
ACCURATE SCREW MACHINE CO

VISHAY
VISHAY LITEON
VISHAY RESISTORS
VISHAY ROEDERSTEIN
VISHAY SILICONIX
VISHAY SPRAGUE
VISHAY VITRAMON
VISHAY/DALE
VISHAY/LITEON
VISHAY/OHMTEK
VISHAY/TELEFUNKEN
VISHAY-BCC
VISHAY-LITEON
VISHAY-SILICONIX
VISUAL SYSTEMS




Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.