I have a RegEx that works for me, but I don't know WHY it works for me. I will explain.
RegEx: \s*<in.*="(<?.*?>)"\s*/>\s*
The text he finds (he finds an empty space before and after the input tag):
<td class="style9"> <input name="guarantor4" id="guarantor4" size="50" type="text" tabindex="10" value="<?php echo $data[guarantor4]; ?>" /> </td> </tr>
The part I don't understand:
<in.*=" <--- As I understand it, this should only find up to the first =" as in it should only find <input name=" It actually finds: <input name="guarantor4" id="guarantor4" size="50" type="text" tabindex="10" value=" which happened to be what I was trying to do.
What I do not understand about this RegEx?
source share