On 20 October 2011 11:46, agentzh <agentzh@gmail.com> wrote:
> On Thu, Oct 20, 2011 at 4:17 PM, Nginx User <nginx@nginxuser.net> wrote:
>>> Why not put your Lua code into an external .lua file and use
>>> access_by_lua_file or rewrite_by_lua_file instead? That way you only
>>> need to escape each "\" only once.
>> I am using an external .lua file and I only get consistent results
>> when I use "\\\s" etc. "\\s" etc resulted is several ")" expected near
>> "|" type messages.
>>
>
> "\\\s" is essentially equivalent to "\\s" in Lua string literals
> because "\s" evaluates to "s".
Would the Nginx string literal you mentioned before not then turn
"\\s" into "\s" ... which is were I want to be in the end? I suspect I
am missing something in the process.
Wish I could just use the familiar "\" and have it figured out in the
background without me having to worry about it as rewrite apparently
does though.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx