Click to See Complete Forum and Search --> : Searching a Database in ASP


b_cochofel
May 7th, 2003, 09:15 AM
Ok, I want to search a database for a keyword but I want people to be able to make mistakes with (i.e. 'têm' could be 'tem'), sorry for all english users, but I'm a portuguese and our language has this grammar issues...

I would like to replace 'ê' and 'e' for '%' to search in a SQL query, but I want to know if is another way besides using Replace() 2 times, first for 'ê' to '%' and then 'e' to '%'???

Satishpp
May 7th, 2003, 02:41 PM
I think you should use regular expressions, though you may still need to do two passes for your problem.

http://www.javascriptkit.com/javatutors/re.shtml

http://www.javascriptkit.com/javatutors/redev.shtml

Satish