lua-users home
lua-l archive

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


Philippe Lhoste wrote:
You want to write something like "foo([\r\n]|$)"?
It isn't possible with the standard string library, because the regex engine is simple and doesn't support alternatives.
But in this case, you can append a '\n' to the string and match it with "foo([\r\n])"

--
Thomas Lavergne                       "Le vrai rêveur est celui qui rêve
                                       de l'impossible."  (Elsa Triolet)
thomas.lavergne@reveurs.org                           http://reveurs.org