regular expression

Nice Regular expression for text input

by Ali Raza Zaidi on March 6, 2009

i found a use full regular expression vaildating input string, you can use it to filter sql injection attacks while taking input for username, title ect.

^[a-zA-Z]+(([.- ][a-zA-Z0-9 ])?[a-zA-Z0-9]*)*$

{ Comments on this entry are closed }

regular expression for email address validation

by Ali Raza Zaidi on October 20, 2008

hi use this regular expression for email address validation
^[A-Za-z0-9](([_.-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([.-]?[a-zA-Z0-9]+)*).([A-Za-z]{2,})$

Regular expression validator in asp.net would be like

Chears…

{ Comments on this entry are closed }

Regular expression for html Table Parsing

by Ali Raza Zaidi on February 1, 2008

here are some Regular expressions for html parsing . you can use it in your application while parsing html table to fetch data from it

  1.  Table Expression  = “<table[^>]*>(.*?)</table>”  
  2.   Header Expression  = “<th[^>]*>(.*?)</th>”  
  3.   Row Expression  = “<tr[^>]*>(.*?)</tr>”  
  4.   Column Expression  = “<td[^>]*>(.*?)</td>”  

 

{ Comments on this entry are closed }