You could use OCONV(ORIG.STRING,"MC/B") to find all the non alpha /
numerics, and then what Wol says

REM.STRING = OCONV(ORIG.STRING,"MC/B")
NEW.STRING = CONVERT(ORIG.STRING,REM.STRING,STR(LEN(REM.STRING))

Of course, if you don't need the spaces then just oconv with "MCB" will
filter down to just numerics & alphabetics

Ed

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of David A.
Green
Sent: 23 August 2010 15:35
To: 'U2 Users List'
Subject: Re: [U2] EREPLACE Function

Linda I would use CONVERT.  It can be done in one pass:

REM.STRING = "!...@#$%^&*()_+-={}|[]\;':",./<>?`~ ":CHAR(9)  ;* Make your
string of characters to Remove
NEW.STRING = CONVERT(REM.STRING, SPACE(LEN(REM.STRING)), OLD.STRING)

David A. Green
(480) 813-1725
DAG Consulting

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda D Law
Sent: Monday, August 23, 2010 5:53 AM
To: U2 Users List
Subject: [U2] EREPLACE Function

Is there a way to negate the selection criteria in the EREPLACE
function?

For example, I want to replace every character that is not A-Z, a-z, 0-9
with a blank.

Perhaps there is a better function for this?

Thanks, 

Linda Law
University of Georgia
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

-------------------------------------------------------------------------------------------
This e-mail and any attachment(s), is confidential and may be legally 
privileged. It is intended solely for the addressee. If you are not the 
addressee, dissemination, copying or use of this e-mail or any of its content 
is prohibited and may be unlawful. If you are not the intended recipient please 
inform the sender immediately and destroy the e-mail, any attachment(s) and any 
copies. All liability for viruses is excluded to the fullest extent permitted 
by law. It is your responsibility to scan or otherwise check this email and any 
attachment(s). Unless otherwise stated (i) views expressed in this message are 
those of the individual sender (ii) no contract may be construed by this 
e-mail. Emails may be monitored and you are taken to consent to this 
monitoring.  

Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 
01628868
Both companies are registered in England and Wales and each has its registered 
office at 2 Burston Road, Putney, London, SW15 6AR.
-------------------------------------------------------------------------------------------

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to