Hello,

this doesn't work:

mysql> SELECT 'oer bv' REGEXP '[b|^b](!?[v$|v])';
+------------------------------------+
| 'oer bv' REGEXP '[b|^b](!?[v$|v])' |
+------------------------------------+
|                                  1 |
+------------------------------------+
1 row in set (0.00 sec)

He shouldn't select this one, because it says 'bv' and no other b

Mike

ViSolve DB Team schreef:
Hi,

[ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from regexp]
because,
In your query,
'!' is an Operator and ? is a wild character. Only wildcharacters should be follow the Operators.
Try with.

SELECT 'boer bv' REGEXP '[b|^b](!?[v$|v])';


Thanks
ViSolve DB Team

----- Original Message ----- From: "Mike van Hoof" <[EMAIL PROTECTED]>
To: "mysql" <mysql@lists.mysql.com>
Sent: Monday, January 08, 2007 1:36 PM
Subject: MYSQL REGEXP help


Hello,

i am try to make a regular expression work, but keep getting this error message:

does anyone know how i can make it work?
The query is:

SELECT 'boer bv' REGEXP '[ b|^b](?![v$|v ])';

So it has to match each starting 'b' and all the b's pf following words. But now followed by a v(line end) or a v followed by a space.

so it should match:

'b test'
'test b'
'test b bv'
'bv b test'

and NOT

'test bv'
'bv test'

Any idea's?!

Thanks, mike

--
Medusa, Media Usage Advice B.V.
Science Park Eindhoven 5216
5692 EG SON
tel: 040-24 57 024  fax: 040-29 63 567
url: www.medusa.nl
mail: [EMAIL PROTECTED]

Uw bedrijf voor Multimedia op Maat


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to