Monthly Archives: July 2010

HowTo html input find/replace regex

Whenever I make a form, it’s a bit of a hassle to add in the php support. That is, if the page gets reloaded of sent back, we want to insure that all the valid data that was entered before is maintained. And easy way to do this is: Here is an easy way, tested in jedit, but should work with little to no modification in other regex capable editors: Find: \<input name=”([\w]+)” value=”([\w]+)” /> Replace: <input name=”$1″ value=”<?= isset(\$_POST['$1']) ? \$_POST['$1'] : ‘$3′ ?>” />