lua-users home
lua-l archive

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


>     eqcharset(compile[[ '\\' ]], m.P"\\")
>     eqcharset(compile[[ '\r' ]], m.P"\r")
>     eqcharset(compile[[ '\073']], m.P"I")
> 
>     eqcharset(compile[[ [\n-A] ]], m.R"\nA")
>     eqcharset(compile[[ [\n-\A] ]], m.R"\n\A")
>     eqcharset(compile[[ [\r] ]], m.P"\r")
>     eqcharset(compile[[ [\n\r\t\'\"\[\]\\] ]], m.S"\n\r\t\'\"[]\\")

A problem with these escapes is that they change meaning if you use quotes
for your patterns. Consider the next example:

     compile([[c:[a-z]+\\[a-z]+]])
     compile( "c:[a-z]+\\[a-z]+")

-- Roberto