{"id":109,"date":"2006-11-28T23:01:17","date_gmt":"2006-11-28T21:01:17","guid":{"rendered":"https:\/\/alax.info\/blog\/109"},"modified":"2006-11-30T03:03:34","modified_gmt":"2006-11-30T01:03:34","slug":"replace-in-clipboard-a-regular-expression-based-text-replacement-utility","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/109","title":{"rendered":"Replace in Clipboard: a regular expression based text replacement utility"},"content":{"rendered":"<p>Replace in Clipboard is an application which monitors clipboard usage and test strings copied into clipboard against predefined patterns. In case the clipboard string matches the pattern, a replacement is offered via system tray icon tool tip. User may accept replacement by clicking the tip, or reject it by ignoring the tip.<\/p>\n<p>For example, &#8220;<em>C:\\Inetpub\\wwwroot\\MyDirectory\\Sample.jpg<\/em>&#8221; string is put into clipboard and the utility would suggest a replacement to &#8220;<em>http:\/\/localhost\/MyDirectory\/Sample.jpg<\/em>&#8220;:<\/p>\n<p><img decoding=\"async\" id=\"image108\" alt=\"image003.png\" title=\"image003.png\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2006\/11\/image003.png\" \/><\/p>\n<p>The patterns are defined in accompanying .ini file (should reside in the same directory as the utility application) and are flexible to configure:<\/p>\n<ul>\n<li>regular expressions are based on ATL syntax<\/li>\n<li>&#8220;<em>Ignore Case<\/em>&#8221; and &#8220;<em>Global Match<\/em>&#8221; options are supported<\/li>\n<li>patterns may defined to be recursive<\/li>\n<\/ul>\n<p>Below is an example of configuration file with comments:<\/p>\n<blockquote><p><strong>[http]<\/strong> \/\/ pattern identifier &#8220;http&#8221;<br \/>\n<strong>required=global<\/strong> \/\/ required identifiers to activate pattern; &#8220;<em>global<\/em>&#8221; means top level pattern<br \/>\n<strong>recourse=dash-to-slash-needed<\/strong> \/\/ patterns to apply recoursively on replaced text<br \/>\n<strong> find=^C\\:\\\\Inetpub\\\\wwwroot\\\\{.+}$ <\/strong>\/\/ find pattern<strong><br \/>\nreplace=http:\/\/localhost\/\\1<\/strong> \/\/ replace pattern, \\1 stands for text inside first {&#8230;} brackets in find pattern<br \/>\n<strong> ignorecase=1<\/strong> \/\/ ignore case or not<br \/>\n<strong> globalmatch=0<\/strong> \/\/ global match means stop at first occurrence<br \/>\n<strong> ;multiline=0<\/strong> \/\/ multiline is not supported yet<\/p><\/blockquote>\n<blockquote><p><strong>[dash-to-slash]<\/strong> \/\/<br \/>\n<strong> required=dash-to-slash-needed<\/strong> \/\/ this pattern is only applied on [<em>http<\/em>] replaced substrings<br \/>\n<strong> recourse=<br \/>\nfind=\\\\<br \/>\nreplace=\/<br \/>\nignorecase=1<br \/>\nglobalmatch=1<br \/>\n;multiline=0<\/strong><\/p><\/blockquote>\n<p>The application does not required installation\/uninstallation.<\/p>\n<p>Application Name: Alax.Info Replace in Clipboard<br \/>\nLatest Version: 1.0.0<br \/>\nDownload Link: <a id=\"p110\" href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2006\/11\/replaceinclipboard-10058.zip\">Replace in Clipboard 1.0.0.58<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Replace in Clipboard is an application which monitors clipboard usage and test strings copied into clipboard against predefined patterns. In case the clipboard string matches the pattern, a replacement is offered via system tray icon tool tip. User may accept replacement by clicking the tip, or reject it by ignoring the tip. For example, &#8220;C:\\Inetpub\\wwwroot\\MyDirectory\\Sample.jpg&#8221;&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/109\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,2],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-atl","category-utilities"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}