[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: word boundary \b (regular expression) in Lua
- From: Zhe Hu <iamhuzhe@...>
- Date: Tue, 29 Mar 2005 07:04:27 -0600
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.
On Tue, 29 Mar 2005 12:18:40 +0200, Klaus Ripke <email@example.com> 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