By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,543 Members | 2,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,543 IT Pros & Developers. It's quick & easy.

Ignoring non-alphanumeric characters...

P: n/a
OK, here's possibly a weird one. Is there any way to do string comparisons
and ignore all non-alphanumeric characters? For instance, check "foobar" and
have it match an existing record of "f$#!oo B(a)*R".

- Daniel
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Daniel Tonks" wrote:
OK, here’s possibly a weird one. Is there any way to do string
comparisons
and ignore all non-alphanumeric characters? For instance, check
"foobar" and
have it match an existing record of "f$#!oo B(a)*R".

- Daniel


check for "mysql regex" on search engines.
http://dev.mysql.com/doc/mysql/en/Regexp.html

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-Ignori...ict137692.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=460751
Jul 20 '05 #2

P: n/a
"steve" <Us************@dbForumz.com> wrote in message
news:41**********@news.athenanews.com...
"Daniel Tonks" wrote:
> OK, here’s possibly a weird one. Is there any way to do string
> comparisons
> and ignore all non-alphanumeric characters? For instance, check
> "foobar" and
> have it match an existing record of "f$#!oo B(a)*R".
>
> - Daniel


check for "mysql regex" on search engines.
http://dev.mysql.com/doc/mysql/en/Regexp.html


I looked into that, but it only seems useful to specific pattern matching -
I can't find any way to selectively NOT match something that is unknown,
while continuing to match something else (and not have it also match normal
characters, such as "footbar"). After some Googling I found someone who
merely wanted to ignore spaces, but alas it looks like even that cannot be
done with mere database commands.

So I many have to go the inefficient route: retrieve the entire column and
do my own processing.

- Danniel
Jul 20 '05 #3

P: n/a

"Daniel Tonks" <dtonks@sunstormADD-DOT-COM> skrev i en meddelelse
news:41**********************@authen.newsreader.vi si.com...
"steve" <Us************@dbForumz.com> wrote in message
news:41**********@news.athenanews.com...
"Daniel Tonks" wrote:
> OK, here's possibly a weird one. Is there any way to do string
> comparisons
> and ignore all non-alphanumeric characters? For instance, check
> "foobar" and
> have it match an existing record of "f$#!oo B(a)*R".
>
> - Daniel


check for "mysql regex" on search engines.
http://dev.mysql.com/doc/mysql/en/Regexp.html

So I may have to go the inefficient route: retrieve the entire column and
do my own processing.


If you do this search often, make an extra column and store the "cleaned"
version of the column.

Leif
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.