Parsing ASP?
logistix
logistix at cathoderaymission.net
Fri May 2 11:24:43 EDT 2003
On Fri, 2 May 2003, Ben Allfree wrote:
> Does anyone know of a good way to parse ASP pages?
>
> <%(.*?)%> will not work for large pages (stack overflow), and anyway, it
> doesn't take into account that ASP like this is legal:
>
> <% response.write("This %> will fool <% most any %> parser") %>
>
>
Re's can't process any HTML/XML/SGML type variants.
You basically need to break things down into tokens and process based on
that. Most people use a callback approach from there or build a
tree.
the HTMLparser module shows you how to use the callback approach with
straight HTML (but no
asp).
More information about the Python-list
mailing list