in reply to Re: Perl HTML Form elements Filter
in thread Perl HTML Form elements Filter

here, I gots it:

while(<>) { while (/(input|textarea|select).*?name="?(.*?)"?\s+/gsi) { print " +$2\n" } }

thats from markjugg.

 

-justin simoni
!skazat!

Replies are listed 'Best First'.
Re: Re: Perl HTML Form elements Filter
by markjugg (Curate) on Jan 31, 2001 at 22:16 UTC
    I'm not sure what I was thinking when I put the while loop instead the while loop. I like it better like this:
    while(<>) { if (/(input|textarea|select).*?name="?(.*?)"?[\s>]/gsi) { prin +t "$2\n" } }
    update: This has the known bug of failing if the tag spans multiple lines. Maybe some other ones, too. :)

    -mark