Hello!
On Thu, Oct 23, 2014 at 3:43 PM, vincent.mc.li wrote:
> I am attempting to write a PHP code to parse nginx configuration file,
> display it in browser and change it in browser, sort of GUI for nginx
> configuration. it seems not so hard to do but i have no idea how to parse
> the directive like below
>
> content_by_lua '
> blabla
> blabla
> blabla
> blabla
> ';
>
I don't really write PHP. But I think the following regex to match the
single-quoted strings should be sufficient: /'(?:\\.|[^'])*'/ (The //
are just regex delimiters as in Perl).
Hope this helps.
Regards,
-agentzh