Francesco Del Vecchio wrote:
> Maybe I can explain better showing you the real problem.
>
> I have an HTML form and I'm parsing it looking for <FORM> tags
>
> When I find one I need to catch the "ACTION" value.
>
> i.e.
>
> <form action=http://www.somedomain.com method=post>
>
> I need to catch "http://www.somedomain.com";. Obiouvsly the "method"
> can also not to be absent, so I need a generiche pattern matching.

This sort of stuff can be done with modules like HTML::TreeBuilder
or HTML::TokeParser, but since your question is about a regex
solution, what you want is all the non-space characters immediately
following 'action='. Like this:

    my ($action) = ($form=~ /action=(\S+)/);

I'm assuming there won't be more than one form tag in the string
to be searched?


Rob




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to