Re: Get text "literally" from a TextBox



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.

"Patrice" <http://www.chez.com/scribe/> wrote in message
news:uVROIwP3IHA.1196@xxxxxxxxxxxxxxxxxxxxxxx
Be aware that any regular expression is very much slower then any direct
method as you don't need more than 10 methods.

Yes that's why I suggested looking at the VS IDE that allows to switch
regular expression support on or off as needed....

For now it looks a bit weird to me to use a VB.NET expression to enter
characters that are easily entered using the keyboard (and you also have
the Alt-<Num code> keys sequence or you could call charmap) so instead of
using vb.net expressions to enter characters I would use just what the
user entered using the keyboard and would let the user to activate regular
expression when needed (for example to signal the end of the line if this
is what vbCrLf is intended for in the sample).

--
Patrice



.



Relevant Pages

  • Re: JavaScript to validate User input
    ... I need to write a Java Script for a string payment_code which comes ... If a user enters characters other than the mentioned above, ... Calulate the length of the string variable ls_tmp_string and store ... Or buy the great book 'Mastering regular expressions' by O'Reilly. ...
    (comp.lang.javascript)
  • Re: regex/replace white list
    ... It removes the problem that Regular Expressions ... cannot span lines because string concatenation serves the purpose. ... RegExp special characters parsed as expression atoms instead. ... The latter introduces the maintenance problem that the ...
    (comp.lang.javascript)
  • Re: Small confusion about negative lookbehind
    ... > My candidate string is "ab". ... > The expressions I'm testing this string against are the following, ... but the position between characters. ... Regular expressions describe not only strings, ...
    (comp.lang.java.programmer)
  • Re: strings vs regular expressions
    ... Just to clear things up regarding regular expressions versus string ... characters in a string, which may be different characters in the same ... pattern, and string functions for looking for substrings. ...
    (microsoft.public.dotnet.framework)
  • Re: retrieving time using Format()
    ... In regular expressions, characters in a pattern string that represent something else are called meta-characters, so that is the term I'll use here. ... The general rule about whether the 'm' meta-character is interpreted as 'minute' instead of 'month' appears to be this... ...
    (microsoft.public.vb.general.discussion)