[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: javascript parser in lua
- From: Coda Highland <chighland@...>
- Date: Wed, 12 Nov 2014 13:24:34 -0800
On Wed, Nov 12, 2014 at 1:22 PM, Gordon Madarm <gmadarm@gmail.com> wrote:
> I've been using lua-gumbo to parse html, but now need to parse javascript
> embedded in the HTML as well. Short of using regex's what can I use to parse
> a document containing several javascript window.open() functions in lua to
> access the URI?
>
> thanks,
>
> - G
It'd be seriously overkill to drag in a complete JS parser just for
that. Use string functions to search the JS code for window.open and
then grab the URL from there.
/s/ Adam