lua-users home
lua-l archive

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


Try "^.*b".

Well, I guess I simplified the example. Consider this search:

("a"):rep(100000):find("a(.*)b")

It just looks odd that it can take over a minute to look for such a pattern in a 100 KB file if there's no match, whereas it will be "instantaneous" if there is one:

(("a"):rep(100000).."b"):find("a(.*)b")