regex - Grepping for the form action= part of html pages -


i trying grep parts of html form, action part i.e. <form action = ….
tried:
grep -e -e 'form\s*action\s*=.*[.]html' ./*
did not work (despite fact there such strings.
tried basic: grep -e -e 'form\s*action\s*=' ./* did not work either!
doing wrong?

this wont action. part before action. example if have <form id="myform" action="myfile.php">the regexp form id="myform" action=

so try in stead:

grep -e -o -i -e '<form\s+[^>]*action\s*=[^>]*>' ./*

[^>]* means except >, 0 or more times.
-o means matching part
-i means case insensitive


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -