469,579 Members | 1,157 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Ignoring non-alphanumeric characters...

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
3 3300
"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
"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

"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.

Similar topics

4 posts views Thread by Douglas F. | last post: by
5 posts views Thread by Robert Downes | last post: by
2 posts views Thread by Paul Bramscher | last post: by
4 posts views Thread by Srikanth | last post: by
3 posts views Thread by CJ Taylor | last post: by
2 posts views Thread by Daniel Gaudreault | last post: by
reply views Thread by mrafi | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.