regular expression

  • Thread starter Thread starter jb
  • Start date Start date
J

jb

Hi,

Am trying to check a string from a textbox for sql injection. I want to
make sure there is only one space between each word. Whats the regular
expression to remove all extra white spaces / new lines etc from a string?

Thank

JB
 
not sure that it's a best to check against SQL injection.
Just do sSql = sSql.Replace("'", "''") before run it through Sql server.
There is single quote as 1st parameter and 2 single quotes as 2nd parameter.


George.
 
Back
Top