{"id":6418,"date":"2022-11-02T16:23:11","date_gmt":"2022-11-02T22:23:11","guid":{"rendered":"https:\/\/editorium.com\/archive\/?p=6418"},"modified":"2022-11-11T11:34:21","modified_gmt":"2022-11-11T18:34:21","slug":"wildcard-secrets-revisited","status":"publish","type":"post","link":"https:\/\/editorium.com\/archive\/wildcard-secrets-revisited\/","title":{"rendered":"Wildcard Secrets Revisited"},"content":{"rendered":"<p>A few weeks ago I sent out an article called &quot;Three Wildcard Secrets.&quot; I thought they were pretty good secrets, too! You can <a href=\"https:\/\/editorium.com\/archive\/three-wildcard-secrets\/\" title=\"see them here\">see them here<\/a>.<\/p>\n<p>In a nutshell, here are the first two:<\/p>\n<blockquote>\n<p>The wildcard range [A-z], meant to find any uppercase or lowercase letter, will not find accented letters. You have to use [A-Za-z] instead. So I suggested using [!A-z] (not A-z) to find any characters that <em>are<\/em> accented.<\/p>\n<p>Similarly, if you need to find any unspecified Unicode character, you can use the not range [!^000-^255]. That should work, as 255 is the upper limit on ANSI characters, so anything the range finds must be Unicode.<\/p>\n<\/blockquote>\n<p>Then I received a corrective email from macro expert Paul Beverley. The nerve! Here's what Paul had to say about secret #1:<\/p>\n<blockquote>\n<p>You see the problem? It did what you asked, not what you wanted. It finds any character at all, except A-z.<\/p>\n<\/blockquote>\n<p>And Paul is right! The range [!A-z] finds not just accented characters but also spaces, punctuation, and other stuff that isn't letters\u2014something I knew if I'd actually thought about it. You can solve the problem by adding more things that you want to skip. Here's an example:<\/p>\n<p>[!A-z 0-9.,;:\\-\\?\\!^001-^064]<\/p>\n<p>(For more information, see my <a href=\"https:\/\/www.amazon.com\/Wildcard-Cookbook-Microsoft-Word-Jack\/dp\/1434103986\" title=\"Wildcard Cookbook for Microsoft Word\"><em>Wildcard Cookbook for Microsoft Word<\/em><\/a>.)<\/p>\n<p>Next, Paul had this to say about secret #2:<\/p>\n<blockquote>\n<p>On my PC [!^000-^255] throws up an error:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/editorium.com\/archive\/wp-content\/uploads\/2022\/11\/1666739087.png?ssl=1\"><img data-recalc-dims=\"1\" height=\"116\" width=\"300\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/editorium.com\/archive\/wp-content\/uploads\/2022\/11\/1666739087.png?resize=300%2C116&#038;ssl=1\" alt=\"\" \/><\/a><\/p>\n<\/blockquote>\n<p>Now technically, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Latin_script_in_Unicode\" title=\"I was right about the range being [!^000-^255]\">I was right about the range being [!^000-^255]<\/a>. The problem is that Microsoft Word wants [!^001-^255] instead. And to make things even worse, that wildcard range correctly skips the ASCII characters (numbered 0-126) but incorrectly finds the extended ASCII characters (numbered 127-255), <em>even though we've told it not to.<\/em> Microsoft strikes again!<\/p>\n<p>But wait, there's more!<\/p>\n<ul>\n<li>The range [!^128-^255] gives us the same error message as [!^000-^255].<\/li>\n<li>The range [!^127-^255] finds Unicode characters (which it should) and extended ASCII characters (which it should not).<\/li>\n<li>The range [!^127-^254] skips extended ASCII characters (which it should) and Unicode characters (which it should not).<\/li>\n<\/ul>\n<p>All of this weirdness seems to hinge on the points where ASCII becomes extended ASCII, and extended ASCII ends.<\/p>\n<p>Might any of this be useful in your editing work? Yes, if you're using wildcard searches:<\/p>\n<ul>\n<li>Use the range [!^127-^255] to <em>find<\/em> Unicode and extended ASCII characters.<\/li>\n<li>Use the range [!^127-^254] to <em>skip<\/em> Unicode and extended ASCII characters.<\/li>\n<\/ul>\n<p>That should work, at least until Microsoft decides to fix these problems.<\/p>\n<p>Many thanks to Paul Beverley for his valuable feedback. If you'd like a bunch of free editing macros with instructions on how to use them, you'll want to download Paul's book <a href=\"http:\/\/www.archivepub.co.uk\/book.html\" title=\"Macros for Editors\"><em>Macros for Editors<\/em><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/editorium.com\/archive\/wildcard-secrets-revisited\/\" rel=\"bookmark\" title=\"Permalink to Wildcard Secrets Revisited\"><p>A few weeks ago I sent out an article called &quot;Three Wildcard Secrets.&quot; I thought they were pretty good secrets, too! You can see them here. In a nutshell, here are the first two: The wildcard range [A-z], meant to find any uppercase or lowercase letter, will not find accented letters. You have to use [&hellip;]<\/p>\n<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16,19],"tags":[],"class_list":{"0":"post-6418","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-microsoft-word","7":"category-wildcards","8":"h-entry","9":"hentry"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3gfno-1Fw","_links":{"self":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/6418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/comments?post=6418"}],"version-history":[{"count":1,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/6418\/revisions"}],"predecessor-version":[{"id":6419,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/6418\/revisions\/6419"}],"wp:attachment":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/media?parent=6418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/categories?post=6418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/tags?post=6418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}