I have this tag in a php string:
<input type="submit" name="op" id="edit-submit" value="Log in" class="form-submit ajax-trigger" />
that I'd like to replace with
<a href="#" onclick="document.user-login.submit();" class="sign-in">sign in</a>
I'm pretty sure that I need to use the php function preg_replace but I'm not sure of the regular expression. Is it possible to make a regular expression that will replace all <input type="submit" /> tags regardless of what additional properties the tag has?
user-loginis an invalid tag id; you need an underscore there.