why don't you write a function that will read the input and replace...
p.e.,
- count how many times the chr string occurs.
- for each time, make a mid starting at i and finishing at i+4, where i
is the indexof("chr"), store it in a variable
- in this variable, make another mid, retrieving then code number, and
then eval the chr...
- replace the variable where the chr(code) was stored by the real chr
eval...
i lnow you will be restricted to chr codes... but you still can make a
select for chr, asc, vbcr, vblf, vbcrlf.
the strange chacacters will be, already, parse as string...
if you want to remove them, use the ASCII table
(
www.computerhope.com/jargon/a/ascii.htm) and read letter by letter,
checking if the asc( ) code is in the range of numbers and letters...
the easiest way to do things, is the one that works...
Freddy Coal said:
Cor and Patrice, thanks for the answer; I know the regular expressions,
but my problem is how get the pattern string if the user put that in a
Textbox.
I would like get the chain the same way that when you write in Vb.Net, for
example:
Dim User_Pattern as string = "Hello" & chr(65) & chr(135)
If I make that in Vb.Net, I get in the User_Pattern: "HelloAç"
But if the user put in a Textbox: "Hello" & chr(65) & chr(135) , and I
get that in a chain (textbox.text), I obtain:
""Hello" & chr(65) & chr(135)"
Obviously, if I use that like a pattern, the regex don't replace anything,
because he search for all the string, not for the ascii characters for 65
(A) and 135 (ç),
maybe I can depure my string, but exist another especial "characters" like
vbcrlf, or when the user put strange characters with the keyboard Alt+##.
Exits a command of make a trim "comiles" in a string variable?
Thanks in advance.
Freddy Coal.