{"id":2303,"date":"2017-09-20T19:38:50","date_gmt":"2017-09-20T19:38:50","guid":{"rendered":"http:\/\/devsec.smham2.org\/?page_id=2303"},"modified":"2017-09-20T19:38:50","modified_gmt":"2017-09-20T19:38:50","slug":"regex-validator","status":"publish","type":"page","link":"https:\/\/devsec.smham2.org\/?page_id=2303","title":{"rendered":"RegEx Validator"},"content":{"rendered":"<h3>Check Regex against a set of words<\/h3>\n<form action=\"..\/custom\/verify_regex.php\" method=\"POST\">Enter the regular expression:<br \/>\n<input name=\"regex\" type=\"text\" \/><\/p>\n<p>Enter the word(s) that you want to check the regex against (You can enter up to 5):<br \/>\nWord 1: <input name=\"word1\" type=\"text\" \/><br \/>\nWord 2: <input name=\"word2\" type=\"text\" \/><br \/>\nWord 3: <input name=\"word3\" type=\"text\" \/><br \/>\nWord 4: <input name=\"word4\" type=\"text\" \/><br \/>\nWord 5: <input name=\"word5\" type=\"text\" \/><\/p>\n<p><input name=\"action\" type=\"submit\" value=\"Check\" \/><\/p>\n<\/form>\n<hr \/>\n<h3>Check regex substitution<\/h3>\n<form action=\"verify_regex.php\" method=\"POST\">Enter the regular expression correction:<br \/>\n<input name=\"regex\" type=\"text\" \/><\/p>\n<p>Enter the character(s) replacement:<br \/>\n<input name=\"new_char\" type=\"text\" \/><\/p>\n<p>Enter the word that you want to check the substitution regex against:<br \/>\n<input name=\"word\" type=\"text\" \/><\/p>\n<p><input name=\"action\" type=\"submit\" value=\"Replace\" \/><\/p>\n<\/form>\n<hr \/>\n<h3>Regular Expression Cheat Sheet<\/h3>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>[abc]<\/td>\n<td>A single character of: a, b or c<\/td>\n<td>.<\/td>\n<td>Any single character<\/td>\n<td>(&#8230;)<\/td>\n<td>Capture everything enclosed<\/td>\n<\/tr>\n<tr>\n<td>[^abc]<\/td>\n<td>Any single character except: a, b, or c<\/td>\n<td>\\s<\/td>\n<td>Any whitespace character<\/td>\n<td>(a|b)<\/td>\n<td>a or b<\/td>\n<\/tr>\n<tr>\n<td>[a-z]<\/td>\n<td>Any single character in the range a-z<\/td>\n<td>\\S<\/td>\n<td>Any non-whitespace character<\/td>\n<td>a?<\/td>\n<td>Zero or one of a<\/td>\n<\/tr>\n<tr>\n<td>[a-zA-Z]<\/td>\n<td>Any single character in the range a-z or A-Z<\/td>\n<td>\\d<\/td>\n<td>Any digit<\/td>\n<td>a*<\/td>\n<td>Zero or more of a<\/td>\n<\/tr>\n<tr>\n<td>^<\/td>\n<td>Start of line<\/td>\n<td>\\D<\/td>\n<td>Any non-digit<\/td>\n<td>a+<\/td>\n<td>One or more of a<\/td>\n<\/tr>\n<tr>\n<td>$<\/td>\n<td>End of line<\/td>\n<td>\\w<\/td>\n<td>Any word character (letter, number, underscore)<\/td>\n<td>a{3}<\/td>\n<td>Exactly 3 of a<\/td>\n<\/tr>\n<tr>\n<td>\\A<\/td>\n<td>Start of string<\/td>\n<td>\\W<\/td>\n<td>Any non-word character<\/td>\n<td>a{3,}<\/td>\n<td>3 or more of a<\/td>\n<\/tr>\n<tr>\n<td>\\z<\/td>\n<td>End of string<\/td>\n<td>\\b<\/td>\n<td>Any word boundary<\/td>\n<td>a{3,6}<\/td>\n<td>Between 3 and 6 of a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Check Regex against a set of words Enter the regular expression: Enter the word(s) that you want to check the regex against (You can enter up to 5): Word 1: Word 2: Word 3: Word 4: Word 5: Check regex substitution Enter the regular expression correction: Enter the character(s) replacement: Enter the word that you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2303","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/devsec.smham2.org\/index.php?rest_route=\/wp\/v2\/pages\/2303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devsec.smham2.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/devsec.smham2.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/devsec.smham2.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devsec.smham2.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2303"}],"version-history":[{"count":1,"href":"https:\/\/devsec.smham2.org\/index.php?rest_route=\/wp\/v2\/pages\/2303\/revisions"}],"predecessor-version":[{"id":2304,"href":"https:\/\/devsec.smham2.org\/index.php?rest_route=\/wp\/v2\/pages\/2303\/revisions\/2304"}],"wp:attachment":[{"href":"https:\/\/devsec.smham2.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}