lua-users home
lua-l archive

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

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. 

Hu Zhe

On Tue, 29 Mar 2005 12:18:40 +0200, Klaus Ripke <> 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
> vi +/frontier lstrlib.c