I'm trying to match all <input> where type=text and then extract the name and value params. Because type, name, and value could be in any order I used the ? quantifier on the value and text params. Unfortuantly this also prevents the matched values from being stored in the $1,$2,$3,... variables. Is there a good way to get around this?
/<input[^>]*(value="?'?[^'"]+"?'?)?[^>]*(type="?'?text"?'?)?[^>]*(value="?'?[^'"]+"?'?)?[^>]*name="?'?([^>\s"]+)"?'?[^>]*(value="?'?[^'"]+"?'?)?[^>]*(type="?'?text"?'?)?[^>]*(value="?'?[^'">]+"?'?)?[^>]*>/ Celia
/<input[^>]*(value="?'?[^'"]+"?'?)?[^>]*(type="?'?text"?'?)?[^>]*(value="?'?[^'"]+"?'?)?[^>]*name="?'?([^>\s"]+)"?'?[^>]*(value="?'?[^'"]+"?'?)?[^>]*(type="?'?text"?'?)?[^>]*(value="?'?[^'">]+"?'?)?[^>]*>/ Celia