> >select corrige_email > >SCAN FOR corrige_email.email_1 = " " > > > IF "@hotmail.com.br" $ corrige_email.email_x .OR.; > "@hotimail" $ corrige_email.email_x .OR. ".co.br" $ corrige_email.email_x .OR. ; > "@hotemail" $ corrige_email.email_x .OR.; > "@hotamil" $ corrige_email.email_x .OR.; > "@hotmais" $ corrige_email.email_x .OR.; > "@hotml" $ corrige_email.email_x .OR.; > "@hotmaiil" $ corrige_email.email_x .OR.; > "@hotmil" $ corrige_email.email_x .or.; > "@hotmill" $ corrige_email.email_x .or.; > "@hotmaio" $ corrige_email.email_x .or.; > "@hotmai" $ corrige_email.email_x .or.; > "@htmail" $ corrige_email.email_x .or. "@homail" $ corrige_email.email_x .or.; > "@hotmaol" $ corrige_email.email_x .or.; > "@rotmail" $ corrige_email.email_x .or.; > "@hotmal" $ corrige_email.email_x .or.; > "@hotm" $ corrige_email.email_x .or.; && se der certo substitui quase todos > "@hotmel" $ corrige_email.email_x > STORE corrige_email.email_x TO lcValue > > replace corrige_email.email_1 with LEFT(lcValue,AT("@",lcValue)-1)+"@hotmail.com" > > > > ENDIF > > ENDSCAN > >Adding to what Dragan said, this way you move the testing of bad hotmail spellings to a single location. That means you can maintain that list in a single location.
BADHOTMAIL.PRG LPARAMETERS m.tcOriginal if inlist(m.tcOriginal, "hotm", "rotmail", "htmail", ...) return .t. endif return .f.
lcServer=getwordnum(corrige_email.email_x, "@", 2) IF BADHOTMAIL(m.lcServer) replace corrige_email.email_1 with getwordnum(corrige_email.email_x, "@", 1)+"@hotmail.com" endifYou could also create a table of bad hotmail spellings and then allow for something like this...
replace corrige_email.email_1 with ; strtran(corriege_email_x,getwordnum(corrige_email.email_x, "@", 2),"@hotmail.com") ; for corrige_email.email_1 = " " and seek(getwordnum(corrige_email.email_x, "@", 2)