thanks to you i notice a well algo ... for regex
when i put [*! * is not interpreted as a special car ! wouah select ort from localite_ortsnamen where ort REGEXP "^([A-Za-z]|[0-9]|[*!æàâäåáãçéèêëîïìíñõôöòóøùúûüÿÅÅÀÂÄÇÉÈÊËÎÏÑÔÖÛÜß&\\'\\>\\ (\\)\\,\\//\\. -])+$"; ----- Original Message ----- From: "Giuseppe Maxia" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 21, 2001 4:10 PM Subject: a select n a regexp expression > >Hello, I'm always with my access to mysql port. > >I noticve that access can dispaly a â but it s like a a. > >So I make this query to select some specials row from my database : > >select ort from localite_ortsnamen > >where ort REGEXP > "^([A-Za-z]|[àâäåáãçéèêëîïíñõôöóùúûüÿÅÅÀÂÄÇÉÈÊËÎÏÑÔÖÛÜß', -])+$"=0; > >I'd like to add the possibilite from the ort column to have char like (),->' > >...., but it doesn't work > >i try to escape these cars with a \, but nothing. So how can I do this ? > >thanks. > > You should either use a double backslash > \\( > \\> > or put the special symbols inside a character class > > [-)(>'abc]. In this case, to avoid syntax errors, the dash ("-") shoud be at the beginning of the class. > > select "a(bc" regexp "[)(x-s]" > gives you a syntax error, because the dash is interpreted (wrongly) as range operator > > notice that > select "a-bc" regexp "[)(x-z]" > will execute without errors, but the dash in this is a range operator, > not a character to match. It means: match a parenthesis, or lowercase letters from "x" to "z". > Therefore it will return 0. > > select "a(bc" regexp "[-)(ba)]"; > returns 1. > > select "a(bc" regexp "\\(" ; > returns 1 > > select "a(bc" regexp "[-'(>]"; > returns 1; > > select "a(bc" regexp "(" > gives you an error. > > Giuseppe Maxia > > > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php