lua-users home
lua-l archive

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


Hi,
Thank you very much for the help. I guess the following line solved my problem.

print(string.gsub("the cat in the hat", "%f[%w](%w)", function (s)
return " "..string.upper(s) end))

However, it seems still not a look-around. It eats up the " " between words. 


Sincerely,
Hu Zhe


On Tue, 29 Mar 2005 12:18:40 +0200, Klaus Ripke <paul-lua@malete.org> wrote:
> On Tuesday 29 March 2005 02:55, Zhe Hu wrote:
> > Since there isn't word boundary (anchor point) in Lua, is there?
> There is the undocumented "frontier" capture
> http://lua-users.org/cgi-bin/namazu.cgi?idxname=lua-l&query=frontier
> vi +/frontier lstrlib.c
>