Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Regular Expressions to find character like 'á' and 'a'

344 views
Skip to first unread message

Michael

unread,
Jul 29, 2008, 4:04:32 AM7/29/08
to
Hi,

is it possible to search 'ware' and also find 'wáre' with REGEXP? If I
do following SELECT, it finds only "ware".

SELECT column from table WHERE column REGEXP '[[:<:]]ware[[:>:]]'


Thanks!
Best Regards, Michael

Captain Paralytic

unread,
Jul 29, 2008, 5:29:15 AM7/29/08
to

You need to search Google for
mysql accent insensitive searching

I found this:
http://forums.mysql.com/read.php?103,97131,97131#msg-97131

Michael

unread,
Jul 29, 2008, 5:54:45 AM7/29/08
to

that one works with LIKE, I need REGEXP, because it can search with
word boundaries. With LIKE I must make huge query with ca. 100 OR's
(thrue several columns)

I found only that REGEXP is not multi-byte safe and so it is not
possible to do my search with it. Because almost all my tables have
accented chars, REGEXP is useless for me.

Anyway, thanks for your reply!

joaopaul...@gmail.com

unread,
Apr 27, 2013, 10:41:37 AM4/27/13
to
I'm still looking for the same thing.

Luuk

unread,
Apr 27, 2013, 2:47:22 PM4/27/13
to
Why not simply use 'like' ?

mysql> create table word (word varchar(20));
Query OK, 0 rows affected (0.44 sec)

mysql> insert into word values ('ware');
Query OK, 1 row affected (0.06 sec)

mysql> insert into word values ('wáre');
Query OK, 1 row affected (0.06 sec)

mysql> select * from word;
+-------+
| word |
+-------+
| ware |
| wáre |
+-------+
2 rows in set (0.00 sec)

mysql> select * from word where word like 'ware';
+-------+
| word |
+-------+
| ware |
| wáre |
+-------+
2 rows in set (0.00 sec)

mysql> show create table word;
+-------+----------------------------------------------------------------------------------------------+
| Table | Create Table
|
+-------+----------------------------------------------------------------------------------------------+
| word | CREATE TABLE `word` (
`word` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+-------+----------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)


Jerry Stuckle

unread,
Apr 27, 2013, 3:05:34 PM4/27/13
to
On 4/27/2013 2:47 PM, Luuk wrote:
> On 27-04-2013 16:41, joaopaul...@gmail.com wrote:
>> Em terça-feira, 29 de julho de 2008 05h04min32s UTC-3, Michael escreveu:
>>> Hi,
>>>
>>> is it possible to search 'ware' and also find 'wáre' with REGEXP? If I
>>> do following SELECT, it finds only "ware".
>>>
>>> SELECT column from table WHERE column REGEXP '[[:<:]]ware[[:>:]]'
>>>
>>>
>>> Thanks!
>>> Best Regards, Michael
>>
>> I'm still looking for the same thing.
>>
>
>
> Why not simply use 'like' ?
>

<snip>

Is this "let's see how old a post we can reply to" week? :)

Earlier there was one from 2009; now this one from 2008.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

Erick T. Barkhuis

unread,
Apr 27, 2013, 3:20:44 PM4/27/13
to
Jerry Stuckle:

>Is this "let's see how old a post we can reply to" week? :)
>Earlier there was one from 2009; now this one from 2008.

Wouldn't it be remarkable if the Original Poster jumped back in within,
say, 8 hours and replied instantly, showing what he found out after
posting his question?

(Probably won't happen, but sometimes it's nice to have a phantasy that
miraculous, surprising events still happen on Usenet)


--
Erick

Scott Johnson

unread,
Apr 27, 2013, 4:16:19 PM4/27/13
to
hahahaha...oh wait you are serious.

Luuk

unread,
Apr 28, 2013, 12:26:00 PM4/28/13
to
i tried to be serious to,
trying to answering a question 4 hours after it was asked,
getting negative feedback from Jerry, ir should i say Mr Stuckle..... ;(

Jerry Stuckle

unread,
Apr 28, 2013, 2:41:20 PM4/28/13
to
It had nothing to do with your reply, Luuk - but the one you were
replying to. And didn't you see the smiley?

Scott Johnson

unread,
Apr 28, 2013, 6:54:21 PM4/28/13
to
All in good humor my friend.
0 new messages