possible answers to your request are:

select * from tablename where stringname REGEXP
'SAMSUNG[^4]*40GB';

select * from tablename where stringname REGEXP
'SAMSUNG.*40GB'


they both matched your sample string, I personally
like the first one better but it is up to you the one
to use.

regards,
esv.




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

> 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]
> 
> 


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

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to