How can Remove signs from specified text ?

Hi Guys
can someone tell me about a function or procedure that remove all signs
of ( / , . ! # $ % ^ & * ( ) < > ..............etc)
form a specified text

thanks
peruzziAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wim ten BrinkSelf-employed developerCommented:
The simplest way is by using StringReplace but that just replaces one value with another.

But you can use this simple function instead:

type
  TCharSet = set of char;

function ClearString(const Value: string; Chars: TCharSet):string;
var
  I, J: Integer;
begin
  SetLength(Result, Length(Value));
  J := 0;
  for I := 1 to Length(Value) do begin
    if not(Value[I] in Chars) then begin
      Inc(J);
      Result[J] := Value[I];
    end;
  end;
  SetLength(Result, J);
end;

This function will return a string that has been stripped by the characters that you've added to the character set. Use it like this:
  Caption := ClearString('1 / 4, .g ! j#H $ % ^ & * ( ) < >', ['/', ',', '.', '!', '#', '$', '%', '^', '&', '*', '(', ')', '<', '>']);

And the result will have the unwanted characters stripped from the result.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
peruzziAuthor Commented:
Thanks Workshop_Alex
that's good for me and work as i want

thanks again..........................
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.