lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Florian Berger wrote:
Asko Kauppi wrote:
I know that problem, and afik string.find() does not offer a means to  it.

Ok, I have to think about using regexp as Shmuel suggested in his mail.

However, how about string.gsub(txt,"ue","ü") first, and then do the string.find?

That might work for a simple case but I'm looking for a general search and I don't want to modify the text to be searched. If I for example first replace "ue" with "ü" and then search for "München" everything is ok but after that I cannot search word "glue".

A more "natural" transformation is to do it the way around: ü => ue
In French, we would transform œ (œ in HTML) to oe.

It can be a way to do collation too.

Of course, such transformation may be unwanted, eg. if you want to keep a difference between both ways of writing.

If performance isn't an issue, you can also do two searches...

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --