What I am trying to do is make filter that checks and removes invalid characters from a string (text). Rule is specified by regular expressions like :
"a-zA-Z" or "0-9_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\xFF"
I can't find any reference how to do that, could somebody help with this?
If you are on a unix/linux system, you can use the regex library, but really, your rule is simple enough that you don't need reqular expressions. It can be coded quite compactly and run faster without the reqular expressions. Of couse, if reqular expressions are part of the solution criteria then you have no choice. Here is a simple algorithm to filter the string in place with only part of your filter rule.