Hi, my grasp of regex is a little tenuous since i learnt it years back, please help me with identifying html form input and textarea tags
for instance,
i need a php regex that can parse this html block :
[CODE]
<tr>
<td>
<input type=”submit” name=”submit” value=”submit” />
</td>
<td>
<input type=”hidden” name=”action” value=”process_step2″>
</td>
<td width=”306″>
<p><input type=”text” name=”url” value=”http://” size=”25″></p>
</td>
</tr>
and just return all the 3 matches as
[CODE]
<input type=”submit” name=”submit” value=”submit” />
<input type=”hidden” name=”action” value=”process_step2″>
<input type=”text” name=”url” value=”http://” size=”25″>
meaning i dont mind what type= attribute the input is. As long as its an input tag, it has to be matched, and some might have xhtml like “[space]/>” instead of “>” as the closing tag
and please help me get another regex for extracting from this html block:
[CODE]
<table><tr><td><p>
<textarea name=”testing”>
content
</textarea>
</p>
</td></tr></table></div>
that just returns the following for every match
[CODE]
<textarea name=”testing”>
content
</textarea>
thanks soo much.