heh, you almost wrote the regex, you would just do [A-F0-9] as your match (or rather negate it and replace it with whitespace)... that is if you only want uppercase A-F if you want lower do [a-fA-F]

course the problem with your example below would be that all of the letters in 'hackcode' that are in the a-f range would be included.

On 8/7/06, Mischa Uppelschoten ext 10 <[EMAIL PROTECTED]> wrote:
I can figure out how to remove a number of disallowed characters from a string, but what if I want to include only a-f and 0-9 and discard everything else?

so if a user supplies: E97152C6CF1DD198DE95C7F2C2EF5EA0, do nothing
if a user supplies E97152C6CF1DD198DE9;hackcode;

it is supposed to return: E97152C6CF1DD198DE9accde

Is that possible with a single regex? Or will I have to cycle through the string, and replace every character that doesn't match [a-f]|[0-9] with nothing?

Thanks!
Mischa,



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?falogin.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------






--
Steven Ross
web application & interface developer
http://www.zerium.com
[phone] 404-488-4364
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------

Reply via email to