{"id":804,"date":"2011-11-08T19:49:43","date_gmt":"2011-11-09T02:49:43","guid":{"rendered":"http:\/\/markandkelley.com\/mark\/?p=791"},"modified":"2012-02-01T16:32:22","modified_gmt":"2012-02-01T16:32:22","slug":"regular-expressions-any-character-in-javascript","status":"publish","type":"post","link":"https:\/\/www.hickendesign.com\/site\/2011\/11\/regular-expressions-any-character-in-javascript\/","title":{"rendered":"Regular Expressions &#8220;Any Character&#8221; in Javascript"},"content":{"rendered":"<p><strong>The problem:<\/strong><br \/>\nIn Javascript Regular Expressions, the dot character (.) doesn&#8217;t truly represent any character. \u00a0It leaves out new lines.<\/p>\n<p><strong>The solution:<\/strong><br \/>\nRather than using the dot character, try using [\\s\\S] which matches both whitespace and non-whitespace characters. \u00a0This equates to a true &#8220;Any Character&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The problem: In Javascript Regular Expressions, the dot character (.) doesn&#8217;t truly represent any character. \u00a0It leaves out new lines. The solution: Rather than using the dot character, try using [\\s\\S] which matches both whitespace and non-whitespace characters. \u00a0This equates to a true &#8220;Any Character&#8221;.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[14,51,61,62,71,72],"class_list":["post-804","post","type-post","status-publish","format-standard","hentry","category-technical","tag-any-character","tag-javascript","tag-new-line","tag-newline","tag-regular-expression","tag-rexex"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/posts\/804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/comments?post=804"}],"version-history":[{"count":1,"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/posts\/804\/revisions"}],"predecessor-version":[{"id":959,"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/posts\/804\/revisions\/959"}],"wp:attachment":[{"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/media?parent=804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/categories?post=804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hickendesign.com\/site\/wp-json\/wp\/v2\/tags?post=804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}