+1  A: 

Easiest solution that comes to mind is defining a regular expression that returns the input string minus any non-alpha characters in it.

jwenting
Yeah, I was going to use RegEx [^[:alnum:]] with TPerlRegEx but don't really know how to use it correctly. [^[:alnum:]] would work perfectly.
Brad
Well, I used your suggestion with RegEx and figured it out after hours!
Brad
+1  A: 

It's been a while since I did much with Delphi - version 5 was my playground.

Isn't one of the primary features of Delphi 2009 that it's now Unicode throughout, by default.

This has impact on anything that tries to process character by character. Could it be the source of your problem?

Bevan
+1  A: 

Uses StrUtils; //StuffString

var
    Regex: TPerlRegEx;
  I:Integer;
begin
Regex := TPerlRegEx.Create(nil);
Regex.RegEx := '[^[:alnum:]]';
Regex.Options := [preMultiLine];
Regex.Subject := data;
if Regex.Match then begin
    repeat
    data := StuffString(data,Regex.MatchedExpressionOffset,Regex.MatchedExpressionLength,' ');
    until not Regex.MatchAgain;
end;
Brad