John,

using  'one.*two|two.*one' would do it. :)

regards,
esv.


--- John thegimper <[EMAIL PROTECTED]> wrote:

> ok just figured out that if the database contains
> "one and one is two"
> and i use regexp to search for "one two" it will not
> match.
> If i search for "one(.*)two" it will.
> But how can i make it match if i search for "two
> one" ?
> 
> Quoting John thegimper <[EMAIL PROTECTED]>:
> 
> > Here is another user with the same problem
> >
>
http://forums.pcworld.co.nz/archive/index.php/t-34536.html
> > 
> > Maybe his explanation is better :)
> > 
> > Quoting John thegimper <[EMAIL PROTECTED]>:
> > 
> > > SELECT * FROM tbl WHERE item REGEXP
> 'SEARCHSTRING'
> > > 
> > > Database holds:
> > > SAMSUNG IDE 40GB 7200RPM
> > > 
> > > Search for
> > > SAMSUNG IDE 7200RPM = 0 RESULTS
> > > SAMSUNG 40GB 7200RPM = 0 RESULTS
> > > SAMSUNG +40GB +7200RPM = 0 RESULTS
> > > SAMSUNG IDE 40GB = 1 RESULT
> > > 
> > > How do i need to change the SEARCHSTRING to use
> AND for each word?
> > > SAMSUNG 40GB should return one result.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> -------------------------------------------------
> > > FREE E-MAIL IN 1 MINUTE!
> > >  - [EMAIL PROTECTED] - http://www.pc.nu
> > > 
> > > -- 
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:   
> http://lists.mysql.com/[EMAIL PROTECTED]
> > > 
> > > 
> > 
> > 
> > 
> >  
> > 
> > -------------------------------------------------
> > FREE E-MAIL IN 1 MINUTE!
> >  - [EMAIL PROTECTED] - http://www.pc.nu
> > 
> > -- 
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:   
> http://lists.mysql.com/[EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>  
> 
> -------------------------------------------------
> FREE E-MAIL IN 1 MINUTE!
>  - [EMAIL PROTECTED] - http://www.pc.nu
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 


Enrique Sanchez Vela
email: [EMAIL PROTECTED]
-----------------------------------------------------------------------------
It's often easier to fight for one's        ||    We live in the outer space    
           
principles than to live up to them        ||    Rev. Kay Greenleaf
Adlai Stevenson                                ||


                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to