Re: searching for words with special chars

2006-05-10 Thread Adam i Agnieszka Gąsiorowski FNORD aka ALinkA ak a symbol '( { .A. } )'' ||~ { A.A }


On 2006-04-01, at 13:17, Octavian Rasnita wrote:


Hi,

Is it possible to create a query that searches for records which  
contains

words with special chars and with their english correspondents?

For example, if a user searches for mata, I want to return all  
the records

that contain the words:

mata
măta
mâţa
mâţă

(just like Google does).

Is it possible with MySQL, or I need to create all the possible  
combinations

in the client program, then search for all those words?


Use REGEX search with collation patterns - that is symbols
 that the regular expression engine of MySQL will expand into all the
 letters. The syntax is explained in great detail in the manual -  
building

 a regular expression for that kind of search should be easy - simply
 use the letters where the pattern shan't change and collation  
constructs

 in places where you expect variation (like [ăââ]). I'm sure only
 some of the letters of your national alphabet have such variations,  
most should be

 stable, that is, unchanging. You could use alternative patterns
 with OR according to how often a letter mutates (crunch a
 dictionary) - put those more stable in front of REGEX expression. HTH.


--
Seks, seksić, seksolatki...uri: news:pl.soc.seks.moderowana  ~| 
{ A.A }|

When facing my demons, I clothe and feed them and I smile, yes, I smile,
As they're taking me over! End of the night never comes to quickly  
for me!
https://hyperreal.info | https://kanaba.info |= Gościu! Szanuj  
Zieleń!





smime.p7s
Description: S/MIME cryptographic signature


searching for words with special chars

2006-04-01 Thread Octavian Rasnita
Hi,

Is it possible to create a query that searches for records which contains
words with special chars and with their english correspondents?

For example, if a user searches for mata, I want to return all the records
that contain the words:

mata
măta
mâţa
mâţă

(just like Google does).

Is it possible with MySQL, or I need to create all the possible combinations
in the client program, then search for all those words?

Thank you.

Teddy


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



Re: searching for words with special chars

2006-04-01 Thread mysql

There at least two ways to accomplish this.

The easy way is to use the LIKE operator:

See

http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html

Regards 

Keith

In theory, theory and practice are the same;
in practice they are not.

On Sat, 1 Apr 2006, Octavian Rasnita wrote:

 To: mysql mysql@lists.mysql.com
 From: Octavian Rasnita [EMAIL PROTECTED]
 Subject: searching for words with special chars
 
 Hi,
 
 Is it possible to create a query that searches for records which contains
 words with special chars and with their english correspondents?
 
 For example, if a user searches for mata, I want to return all the records
 that contain the words:
 
 mata
 m?ta
 mâ?a
 mâ??
 
 (just like Google does).
 
 Is it possible with MySQL, or I need to create all the possible combinations
 in the client program, then search for all those words?
 
 Thank you.
 
 Teddy
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 

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