lua-users home
lua-l archive

Re: gsub strangeness

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


> Anchoring at the beginning works but anchoring at the end does not,
though.
Ah! Thanks for that, problem solved.
I was writing a wildcard match function, and in using anchoring it works
fine:
function match(str, pat)
 local s,n = gsub(str, "^" .. pat .. "$")
 return s == "" and n == 1
end
Thanks!
Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software

AltStyle によって変換されたページ (->オリジナル) /