MYSQL REGEXP question
am 09.01.2007 12:40:08 von Mike
------=_NextPart_6cc_52b1_522547a3.7fd0d656_.MIX
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
i am try to make a regular expression work, but keep getting an error=20
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.=
=20
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
--=20
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
************************************************************ **********
IMPORTANT NOTICE
This communication is for the exclusive use of the intended recipient(s)
named above. If you receive this communication in error, you should
notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
it and destroy any copies of it.
This communication may contain confidential information and material
protected by copyright, design right or other intellectual property
rights which are and shall remain the property of Piranha Studios
Limited. Any form of distribution, copying or other unauthorised use
of this communication or the information in it is strictly prohibited.
Piranha Studios Limited asserts its rights in this communication and
the information in it and reserves the right to take action against
anyone who misuses it or the information in it.
Piranha Studios Limited cannot accept any liability sustained as a
result of software viruses and would recommend that you carry out your
own virus checks before opening any attachment.
************************************************************ ************
<<<>>>
------=_NextPart_6cc_52b1_522547a3.7fd0d656_.MIX
Content-Type: text/plain;
name="GWAVADAT.TXT"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="GWAVADAT.TXT"
AdmID:FB05127CFE0569CA76887DED108E0F2F
************************************************************ **********
IMPORTANT NOTICE
This communication is for the exclusive use of the intended recipient(s)
named above. If you receive this communication in error, you should
notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
it and destroy any copies of it.
This communication may contain confidential information and material
protected by copyright, design right or other intellectual property
rights which are and shall remain the property of Piranha Studios
Limited. Any form of distribution, copying or other unauthorised use
of this communication or the information in it is strictly prohibited.
Piranha Studios Limited asserts its rights in this communication and
the information in it and reserves the right to take action against
anyone who misuses it or the information in it.
Piranha Studios Limited cannot accept any liability sustained as a
result of software viruses and would recommend that you carry out your
own virus checks before opening any attachment.
************************************************************ ************
<<<>>>
------=_NextPart_6cc_52b1_522547a3.7fd0d656_.MIX
Content-Type: text/plain; charset=us-ascii
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
------=_NextPart_6cc_52b1_522547a3.7fd0d656_.MIX--
Re: MYSQL REGEXP question
am 09.01.2007 19:44:53 von Micah Stevens
--------------020202010900070007090806
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Your code states:
Match: one of the following letters: -,b,|,^,b negative look ahead one
of these: -,v,$,|,v
Which isn't what you're looking for. Remember the negating '^' only
works at the start of a [] list. And '$' only means line-end if it's
outside [], inside it stands for the '$' character.
I think this would work better:
b[^v]$|b[^v]\s?
HTH,
-Micah
mike@php-webdesign.nl wrote:
> Hello,
>
> i am try to make a regular expression work, but keep getting an 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
>
>
> ------------------------------------------------------------ ------------
>
> AdmID:FB05127CFE0569CA76887DED108E0F2F
>
>
>
> ************************************************************ **********
>
> IMPORTANT NOTICE
>
> This communication is for the exclusive use of the intended recipient(s)
> named above. If you receive this communication in error, you should
> notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
> it and destroy any copies of it.
>
> This communication may contain confidential information and material
> protected by copyright, design right or other intellectual property
> rights which are and shall remain the property of Piranha Studios
> Limited. Any form of distribution, copying or other unauthorised use
> of this communication or the information in it is strictly prohibited.
> Piranha Studios Limited asserts its rights in this communication and
> the information in it and reserves the right to take action against
> anyone who misuses it or the information in it.
>
> Piranha Studios Limited cannot accept any liability sustained as a
> result of software viruses and would recommend that you carry out your
> own virus checks before opening any attachment.
>
> ************************************************************ ************
> <<<>>>
>
--------------020202010900070007090806--
Re: MYSQL REGEXP question
am 10.01.2007 10:27:10 von Mike van Hoof
That is it almost :)
SELECT 'oer bv b' REGEXP 'b[^v]$|b[^v]\s?';
gives me 0 as a result, while it shoud give me 1, because there is a b
in there which is not bv.
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: mike@medusa.nl
Uw bedrijf voor Multimedia op Maat
Micah Stevens schreef:
>
> Your code states:
>
> Match: one of the following letters: -,b,|,^,b negative look ahead one
> of these: -,v,$,|,v
>
> Which isn't what you're looking for. Remember the negating '^' only
> works at the start of a [] list. And '$' only means line-end if it's
> outside [], inside it stands for the '$' character.
>
> I think this would work better:
>
>
> b[^v]$|b[^v]\s?
>
> HTH,
> -Micah
>
> mike@php-webdesign.nl wrote:
>> Hello,
>>
>> i am try to make a regular expression work, but keep getting an 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
>>
>>
>> ------------------------------------------------------------ ------------
>>
>> AdmID:FB05127CFE0569CA76887DED108E0F2F
>>
>>
>>
>> ************************************************************ **********
>>
>> IMPORTANT NOTICE
>>
>> This communication is for the exclusive use of the intended recipient(s)
>> named above. If you receive this communication in error, you should
>> notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
>> it and destroy any copies of it.
>>
>> This communication may contain confidential information and material
>> protected by copyright, design right or other intellectual property
>> rights which are and shall remain the property of Piranha Studios
>> Limited. Any form of distribution, copying or other unauthorised use
>> of this communication or the information in it is strictly
>> prohibited. Piranha Studios Limited asserts its rights in this
>> communication and the information in it and reserves the right to
>> take action against anyone who misuses it or the information in it.
>>
>> Piranha Studios Limited cannot accept any liability sustained as a
>> result of software viruses and would recommend that you carry out your
>> own virus checks before opening any attachment.
>>
>> ************************************************************ ************
>> <<<>>>
>>
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: MYSQL REGEXP question
am 10.01.2007 17:50:26 von Micah Stevens
--------------030701020004080000050704
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
No, it shouldn't because there are only two B's, one is followed by a
'v' (one of your exceptions) and the other is at the end of the line, right?
-Micah
Mike van Hoof wrote:
> That is it almost :)
>
> SELECT 'oer bv b' REGEXP 'b[^v]$|b[^v]\s?';
>
> gives me 0 as a result, while it shoud give me 1, because there is a b
> in there which is not bv.
>
> 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: mike@medusa.nl
>
> Uw bedrijf voor Multimedia op Maat
>
>
>
> Micah Stevens schreef:
>>
>> Your code states:
>>
>> Match: one of the following letters: -,b,|,^,b negative look ahead
>> one of these: -,v,$,|,v
>>
>> Which isn't what you're looking for. Remember the negating '^' only
>> works at the start of a [] list. And '$' only means line-end if it's
>> outside [], inside it stands for the '$' character.
>>
>> I think this would work better:
>>
>>
>> b[^v]$|b[^v]\s?
>>
>> HTH,
>> -Micah
>>
>> mike@php-webdesign.nl wrote:
>>> Hello,
>>>
>>> i am try to make a regular expression work, but keep getting an
>>> 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
>>>
>>>
>>> ------------------------------------------------------------ ------------
>>>
>>>
>>> AdmID:FB05127CFE0569CA76887DED108E0F2F
>>>
>>>
>>>
>>> ************************************************************ **********
>>>
>>> IMPORTANT NOTICE
>>>
>>> This communication is for the exclusive use of the intended
>>> recipient(s)
>>> named above. If you receive this communication in error, you should
>>> notify the sender by e-mail or by telephone (+44) 191 224 4461, delete
>>> it and destroy any copies of it.
>>>
>>> This communication may contain confidential information and material
>>> protected by copyright, design right or other intellectual property
>>> rights which are and shall remain the property of Piranha Studios
>>> Limited. Any form of distribution, copying or other unauthorised use
>>> of this communication or the information in it is strictly
>>> prohibited. Piranha Studios Limited asserts its rights in this
>>> communication and the information in it and reserves the right to
>>> take action against anyone who misuses it or the information in it.
>>>
>>> Piranha Studios Limited cannot accept any liability sustained as a
>>> result of software viruses and would recommend that you carry out your
>>> own virus checks before opening any attachment.
>>>
>>> ************************************************************ ************
>>>
>>> <<<>>>
>>>
>>
>>
--------------030701020004080000050704
Content-Type: text/plain; charset=us-ascii
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--------------030701020004080000050704--