LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-26-2006, 08:07 PM   #1
MicahCarrick
Member
 
Registered: Jul 2004
Distribution: Fedora
Posts: 240

Rep: Reputation: 31
MySQL: search for pluralized keywords using RegEx?


Hey y'all. So, this time I'm working on a search script in PHP and MySQL. Now, the search "keywords" are worked into an SQL query based on "Any Words", "All Words", and "Exact Phrase". What I'm trying to do, is come up with a way to search for pluralized (or unpluralized) versions of the keywords.

So, it'd be:
Code:
$regexp = 'I have no clue!';
"SELECT ... WHERE column REGEXP '$regexp'"
Has anyone seen any regular expressions for pluralizing english words? I've been reading some CS papers on the topic, but it seems as though it's going to be quite a doozie.
 
Old 09-26-2006, 08:50 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.2, Centos 5.8
Posts: 11,740

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
There's some good examples in the Perl cookbook if you can get hold of a copy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Open source search technology goes beyond keywords LXer Syndicated Linux News 0 09-26-2006 02:21 AM
PHP MySQL Search Question windisch Programming 14 06-02-2006 12:25 AM
multiple search on mysql gmarais Programming 3 03-10-2004 08:59 AM
mySQL LIKE search is case sensitive? icepig Linux - Software 4 11-14-2003 04:29 PM
Regex search in files with python smokybobo Programming 0 11-08-2003 06:36 PM


All times are GMT -5. The time now is 09:03 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration