{"id":8,"date":"2006-03-20T12:31:55","date_gmt":"2006-03-20T17:31:55","guid":{"rendered":"\/cgi\/wp\/?p=8"},"modified":"2006-03-20T12:39:20","modified_gmt":"2006-03-20T17:39:20","slug":"frontpage-regular-expressions","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=8","title":{"rendered":"FrontPage Regular Expressions"},"content":{"rendered":"<p>FrontPage 2003 added regular expressions to its Find and Replace tool. This is a big improvement and allows for more powerful code editing. Unfortunately, it requires a lot of trial and error to figure out its regular expression syntax which differs from UNIX style syntax.<\/p>\n<p>One of the more useful regular expressions I&#8217;ve come up with is to replace my old method of referring to a form field in JavaScript with my new method which is more compatible with various web browsers. The old method would use something like <b>document.forms[&#8220;name&#8221;].elements[&#8220;name&#8221;].value <\/b> which would break if you change the form name. The better method is to use <b>document.getElementById(&#8220;name&#8221;).value<\/b> which doesn&#8217;t even use the form name.<\/p>\n<p>My <strong>FrontPage Regular Expression <\/strong> changes the syntax of the JavaScript:<\/p>\n<p><strong>Find: <\/strong> document.forms(.)*elements[<br \/>\n<strong>Replace:<\/strong>  document.getElementById(<\/p>\n<p>You must remember to change the closing bracket to a ) and to insert id attributes to your form fields if you did not use them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FrontPage 2003 added regular expressions to its Find and Replace tool. This is a big improvement and allows for more powerful code editing. Unfortunately, it requires a lot of trial and error to figure out its regular expression syntax which &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=8\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8"}],"version-history":[{"count":0,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}