lua-users home
lua-l archive

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


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