{"id":323,"date":"2008-09-08T14:27:54","date_gmt":"2008-09-08T14:27:54","guid":{"rendered":"http:\/\/kera.name\/articles\/?p=323"},"modified":"2012-01-11T17:36:23","modified_gmt":"2012-01-11T17:36:23","slug":"an-open-letter-to-the-internets","status":"publish","type":"post","link":"https:\/\/kera.name\/articles\/2008\/09\/an-open-letter-to-the-internets\/","title":{"rendered":"An Open Letter To The Internets"},"content":{"rendered":"<p>It&#039;s fairly standard practice online when one makes a typo to mark a correction with an asterisk. For example:<\/p>\n<p><code>John says:\nso im going to the cinmena tomorrow u wanna come?\n\nJohn says:\ncinema*<\/code><\/p>\n<p>This strategy (supposedly necessary even amidst a sentence full of grammatically dubious abbreviations) can be taken one step further. If you find yourself in a channel named #C++, #PHP and such like on IRC, you may well see people writing regular expressions to &#034;fix&#034; their previous line. For example:<\/p>\n<p><code>&lt;john361&gt; and do send out emails using a php function?\n&lt;john361&gt; s\/do\/to<\/code><\/p>\n<p>The second line is a regular expression substitution. The &#039;s&#039; means substitution, the &#039;do&#039; is the text to change and the &#039;to&#039; is the text to change it to. So anyone reading john361&#039;s messages should apply the &#034;fix&#034; in their minds and read the original text as:<\/p>\n<p><code>&lt;john361&gt; and to send out emails using a php function?<\/code><\/p>\n<p>Unfortunately, this is incorrect. I have yet to figure out why so many people are doing this at the moment, but there&#039;s an epidemic of omitting terminating regular expression delimiters.<\/p>\n<p>So I&#039;m going to say this once, and once only:<\/p>\n<ul>\n<li>It&#039;s &#034;<code>s\/do\/to\/<\/code>&#034;.<\/li>\n<li>Note the trailing &#034;<code>\/<\/code>&#034;.<\/li>\n<li>It is part of the expression just like the &#034;<code>s\/<\/code>&#034; at the beginning and the &#034;<code>\/<\/code>&#034; in the middle.<\/li>\n<li><strong><code>s\/ORIGINAL\/REPLACEMENT\/<\/code><\/strong>. Do it.<\/li>\n<li>Malformed substitution regexes are <strong>NOT<\/strong> cool!<\/li>\n<\/ul>\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have yet to figure out why so many people are doing this at the moment, but there&#039;s an epidemic of omitting terminating regular expression delimiters.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[9,28,20,27],"_links":{"self":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts\/323"}],"collection":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":7,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"predecessor-version":[{"id":875,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/posts\/323\/revisions\/875"}],"wp:attachment":[{"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kera.name\/articles\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}