{"id":57,"date":"2018-09-18T10:08:56","date_gmt":"2018-09-18T10:08:56","guid":{"rendered":"https:\/\/www.aladan.net\/MIMicry\/?p=57"},"modified":"2018-09-18T10:09:27","modified_gmt":"2018-09-18T10:09:27","slug":"powershell-titlecasing-an-email-address","status":"publish","type":"post","link":"https:\/\/www.aladan.net\/MIMicry\/2018\/09\/18\/powershell-titlecasing-an-email-address\/","title":{"rendered":"Powershell titlecasing an email address, with awesome"},"content":{"rendered":"<p>Sometimes, awesome:<\/p>\n<pre>$split = $address -split \"@\"\r\n$address = ([regex]\"\\w+\").Replace($split[0], { $args[0].ToString().Substring(0, 1).ToUpper() + $args[0].ToString().Substring(1).ToLower() }) + \"@\" + $split[1]<\/pre>\n<p>Handles james.o&#8217;tootle@mydomain.com -&gt; James.O&#8217;Tootle@mydomain.com.\u00a0 Does not handle james.mcnally@hardwork.com -&gt; James.McNally@hardwork.com, though&#8230; sorry but semantic parsing is beyond the scope of this blog \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, awesome: $split = $address -split &#8220;@&#8221; $address = ([regex]&#8221;\\w+&#8221;).Replace($split[0], { $args[0].ToString().Substring(0, 1).ToUpper() + $args[0].ToString().Substring(1).ToLower() }) + &#8220;@&#8221; + $split[1] Handles james.o&#8217;tootle@mydomain.com -&gt; James.O&#8217;Tootle@mydomain.com.\u00a0 Does not handle james.mcnally@hardwork.com -&gt; James.McNally@hardwork.com, though&#8230; sorry but semantic parsing is beyond the scope of this blog \ud83d\ude42<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6,13],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","hentry","category-good","category-howto","category-powershell"],"_links":{"self":[{"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":2,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":59,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/posts\/57\/revisions\/59"}],"wp:attachment":[{"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}