I want to get the identifier or name of a field that continues to change its value.
Example:
I have these fields in my form:
<input type="text" id="94245" name="94245" value="">
<input type="text" id="name" name="name" value="">
<input type="text" id="status" name="status" value="">
And I want to get the identifier or name of the first field, but it continues to change, for example:
<input type="text" id="52644" name="52644" value="">
<input type="text" id="44231" name="44231" value="">
<input type="text" id="94831" name="94831" value="">
A pattern is always a 5-digit value.
I tried this but did not succeed:
preg_match('/(\d)id=\s*([0-9]{5})\s*(\d+)/', $html, $fieldId);
source
share