{"id":4977,"date":"2015-05-27T04:00:02","date_gmt":"2015-05-27T08:00:02","guid":{"rendered":"https:\/\/americaneditor.wordpress.com\/?p=4977"},"modified":"2016-09-19T19:10:29","modified_gmt":"2016-09-20T01:10:29","slug":"lyonizing-word-we-can-do-this-the-easy-way-or","status":"publish","type":"post","link":"https:\/\/editorium.com\/archive\/lyonizing-word-we-can-do-this-the-easy-way-or\/","title":{"rendered":"Lyonizing Word: We Can Do This the Easy Way, or . . ."},"content":{"rendered":"<h3 style=\"text-align:center;\"><strong>We Can Do This the Easy Way,<\/strong><br \/>\n<strong> or We Can Do This the Hard Way<\/strong><\/h3>\n<p style=\"text-align:center;\"><em><strong>by Jack Lyon<\/strong><\/em><\/p>\n<p>American Editor Rich Adin called me recently with a puzzle. He was editing a list of citations that looked like this:<\/p>\n<blockquote><p>Lyon J, Adin R, Poole L, Brenner E, et al: blah blah blah.<\/p><\/blockquote>\n<p>But his client wanted the citations to look like this:<\/p>\n<blockquote><p>Lyon J, Adin R, Poole L, et al: blah blah blah.<\/p><\/blockquote>\n<p>In other words, many of the citations included one author name too many; the client wanted a limit of three rather than four. And there were hundreds of citations. Rich really didn\u2019t want to remove the superfluous names by hand; it would have taken hours to do, and hours are money. And so, Rich queried, \u201cIs there a way to remove the\u00a0fourth\u00a0name automatically?\u201d<\/p>\n<p>There\u2019s nearly always a way. Rich had already tried using a wildcard search, but without success. Microsoft Word kept telling him, \u201cThe Find What pattern contains a Pattern Match expression which is too complex.\u201d<\/p>\n<h4>The Too-Complex Find What<\/h4>\n<p>I\u2019m not sure what wildcard search Rich tried to use, but it might have looked like this:<\/p>\n<p><em>Find what:<\/em><\/p>\n<blockquote><p>([A-Z][a-z]@ [A-Z], )([A-Z][a-z]@ [A-Z], )([A-Z][a-z]@ [A-Z], )([A-Z][a-z]@ [A-Z], )(et al:)<\/p><\/blockquote>\n<p><em>Replace with:<\/em><\/p>\n<blockquote><p>1235<\/p><\/blockquote>\n<p>That\u2019s definitely too complex for Word to handle. Here\u2019s what it means:<\/p>\n<blockquote><p>Find a capital letter ([A-Z])<br \/>\nfollowed by a lowercase letter ([a-z])<br \/>\nrepeated any number of times (@)<br \/>\nfollowed by a space<br \/>\nfollowed by a capital letter ([A-Z])<br \/>\nfollowed by a comma<br \/>\nfollowed by a space<br \/>\nwith all of that in parentheses to form a \u201cgroup.\u201d<\/p><\/blockquote>\n<p>All of that is repeated three more times, then followed by \u201cet al:\u201d in parentheses to form a group.<\/p>\n<p>The \u201cReplace with\u201d string tells Word to replace what it finds with the contents of groups 1, 2, 3, and 5 \u2014 in other words, with the first <em>three <\/em>names followed by \u201cet al:\u201d.<\/p>\n<h4>What\u2019s the Handle?<\/h4>\n<p>If Word could handle it, that should work. But Word <em>can\u2019t <\/em>handle it, so we\u2019ll need to simplify. So we ask ourselves, \u201cWhat, besides letters, do all of the names have in common?\u201d In other words, \u201cWhat\u2019s the handle? What can we grab onto?\u201d Well, that\u2019s easy \u2014\u00a0each name is followed by a comma and a space. That\u2019s our handle!<\/p>\n<p>(For more on this, please see my article \"<a title=\"What's Your Handle? at The Editorium\" href=\"https:\/\/editorium.com\/archive\/whats-your-handle\/\" target=\"_blank\">What\u2019s Your Handle?<\/a>\" (2003)\u00a0at the Editorium Update.)<\/p>\n<h4>The Find That Works<\/h4>\n<p>The handle\u00a0means we can simplify our wildcard search string to something like this:<\/p>\n<p><em>Find what:<\/em><\/p>\n<blockquote><p>([!^013]@, [!^013]@, [!^013]@, )[!^013]@, (et al:)<\/p><\/blockquote>\n<p><em>Replace with:<\/em><\/p>\n<blockquote><p>12<\/p><\/blockquote>\n<p>Here\u2019s what that means:<\/p>\n<blockquote><p>Find any characters except a carriage return ([!^013])<br \/>\nrepeated any number of times (@)<br \/>\nfollowed by a comma<br \/>\nfollowed by a space<br \/>\nwith all of that repeated three times<br \/>\nand enclosed in parentheses to form a \u201cgroup.\u201d<br \/>\nThen it\u2019s repeated one more time, <em>ungrouped<\/em><br \/>\nand followed by \u201cet al:\u201d in parentheses to form a group.<\/p><\/blockquote>\n<p>The \u201cReplace with\u201d string tells Word to replace what it finds with the contents of groups 1 and 2 \u2014 in other words, with the first <em>three <\/em>names (group 1) followed by \u201cet al:\u201d (group 2). The fourth name is simply ignored.<\/p>\n<h4>To Group or Not to Group\u00a0Using Parens<\/h4>\n<p>Rich ran the new\u00a0find and replace, then replied, \u201cThanks, Jack, that works like a charm. Why isn\u2019t the second \u2018group\u2019 grouped, that is, in parentheses? I thought that was necessary.\u201d<\/p>\n<p>I replied, \u201cNo, it\u2019s not necessary. You group only the items that you want to reference (by 1, 2, etc.) in the \u2018Replace with\u2019 box. You <em>could <\/em>group the other item, in which case you would use \u201813\u2019 in the \u2018Replace with\u2019 box. But there\u2019s no <em>need <\/em>to do so.\u201d<\/p>\n<p>Note that this method of finding the names offers another advantage. Not only will it find names that look like this:<\/p>\n<blockquote><p>Lyon J,<\/p><\/blockquote>\n<p>it will also find names that look like this:<\/p>\n<blockquote><p>Lyon JM,<\/p><\/blockquote>\n<p>or even this:<\/p>\n<blockquote><p>Lyon JMQ<\/p><\/blockquote>\n<p>It will even find names like this:<\/p>\n<blockquote><p>Thaler-Carter Ruth,<\/p><\/blockquote>\n<p>or this:<\/p>\n<blockquote><p>Harrison G.B.H.,<\/p><\/blockquote>\n<p>In fact, it will find <em>anything<\/em> (except a carriage return) followed by a comma and a space.<\/p>\n<h4>Why the Carriage Return?<\/h4>\n<p>\u201cWhy,\u201d you may be wondering, \u201cspecify anything but a carriage return? Why not specify letters instead?\u201d Well, we could have done that, using something like this:<\/p>\n<p><em>Find what:<\/em><\/p>\n<blockquote><p>([A-z ]@, [A-z ]@, [A-z ]@, )[A-z ]@, (et al:)<\/p><\/blockquote>\n<p><em>Replace with:<\/em><\/p>\n<blockquote><p>12<\/p><\/blockquote>\n<p>That means:<\/p>\n<blockquote><p>any capital or lowercase letter or space ([A-z ])<br \/>\nrepeated any number of times (@)<br \/>\nfollowed by a comma<br \/>\nfollowed by a space<br \/>\nAnd so on.<\/p><\/blockquote>\n<p>Such a wildcard string would find names like this:<\/p>\n<blockquote><p>Lyon J,<\/p><\/blockquote>\n<p>but not this:<\/p>\n<blockquote><p>Thaler-Carter R,<\/p><\/blockquote>\n<p>Yes, we could add a hyphen to our string, but then we start to wonder about other characters we might need to include, and then things get complicated again. And besides, it\u2019s true that we <em>don\u2019t<\/em> want to include carriage returns in our search, so it makes sense to exclude them. If we tried to simplify too far, we might use this:<\/p>\n<p><em>Find what:<\/em><\/p>\n<blockquote><p>(*, *, *, )*, (et al:)<\/p><\/blockquote>\n<p><em>Replace with:<\/em><\/p>\n<blockquote><p>12<\/p><\/blockquote>\n<p>The problem with using the asterisk wildcard (*) is that it finds <em>any<\/em> <em>character any number of times,<\/em> including tabs, spaces, carriage returns, and everything else you can think of. Sometimes that\u2019s useful, but more often it just leads to confusion. We want to keep things simple but not <em>too <\/em>simple.<\/p>\n<h4>Why Wildcard<\/h4>\n<p>To return to our original problem: Rich could have removed all those extra names one at a time, by hand, which is doing it the hard way and eats into the profit line \u2014 remember that time is money. Microsoft Word includes powerful tools for doing things the easy way, so why not learn them and use them? If you\u2019ve read this far, you\u2019re doing that, so congratulations.<\/p>\n<p>If you\u2019d like to learn more about how to use wildcard searches, you can download my free paper \u201c<a title=\"Advanced Find &amp; Replace at The Editorium\" href=\"http:\/\/www.editorium.com\/ftp\/AdvancedFind.zip\" target=\"_blank\">Advanced Find and Replace in Microsoft Word<\/a>.\u201d Working through\u00a0the paper\u00a0requires some thought and effort, but the payoff is huge.<\/p>\n<h4>Coming Soon<\/h4>\n<p>I hope you\u2019ll watch for my forthcoming <em>Wildcard Cookbook for Microsoft Word.<\/em> I\u2019m still trying to find more real-life examples for the book, so if you have some particularly sticky problems that might be solved using a wildcard search, I hope you\u2019ll <a title=\"Jack Lyon email\" href=\"http:\/\/editor@editorium.com\" target=\"_blank\">send them my way<\/a>.\u00a0Maybe I can save you some work and at the same time figure out solutions that will help others in the future. Thanks for your help!<\/p>\n<h4>For EditTools Users<\/h4>\n<p>If you are a user of <a title=\"EditTools at wordsnSync\" href=\"http:\/\/wordsnsync.com\/\" target=\"_blank\">EditTools<\/a>, you can manually create the find and replace strings in the <a title=\"Wildcard Find &amp; Replace in EditTools\" href=\"http:\/\/wordsnsync.com\/wildcard-find-replace.php\" target=\"_blank\">Wildcard Find &amp; Replace<\/a> macro and then save the macro for future use. However, to do so you need to enter the Find string slightly differently:<\/p>\n<blockquote><p>Find Field #1: [!^013]@, [!^013]@, [!^013]@,<br \/>\nFind Field #2: [!^013]@,<br \/>\nFind Field #3: et al:<\/p><\/blockquote>\n<p>Note that you omit the parens for grouping because EditTools automatically inserts them, which means that you break the string into its group components. (IMPORTANT: Be sure to include in Find Fields 1 and 2 the ending space, i.e., the space following the final comma, which is not visible above.)<\/p>\n<p>Because EditTools treats each of the three fields as a group, your Replace string is:<\/p>\n<blockquote><p>Replace Field #1: 1<br \/>\nReplace Field #2: 3<\/p><\/blockquote>\n<p>After manually entering the information in each of the fields, click <em>Add to WFR Dataset<\/em> and save this macro for future use. Next time you need it, just click <em>Retrieve from WFR Dataset<\/em>, retrieve this string, and run it. That is one of the advantages to using EditTools' Wildcard Find &amp; Replace \u2014 you can write a wildcard macro once and reuse it as many times as you need without having to recreate the macro each time.<\/p>\n<p><em>Jack Lyon (<\/em><a href=\"mailto:editor@editorium.com\"><em>editor@editorium.com<\/em><\/a><em>)\u00a0owns and operates the <\/em><a title=\"The Editorium\" href=\"http:\/\/www.editorium.com\" target=\"_blank\"><em>Editorium<\/em><\/a><em>, which provides macros and information to help editors and publishers do mundane tasks quickly and efficiently. He is the author of <\/em><a title=\"Microsoft Word for Publishing Professionals\" href=\"http:\/\/www.editorium.com\/msword4pubpros.htm\" target=\"_blank\">Microsoft Word for Publishing Professionals<\/a> <em>and of <\/em><a title=\"Macro Cookbook at Barnes &amp; Noble\" href=\"http:\/\/www.barnesandnoble.com\/w\/macro-cookbook-for-microsoft-word-jack-m-lyon\/1107868228?ean=9781434103321\" target=\"_blank\">Macro Cookbook for Microsoft Word<\/a>.<em> Both books will help you learn more about macros and how to use them.<\/em><\/p>\n<h4 style=\"text-align:center;\">Looking for a Deal?<\/h4>\n<p>You can buy <a title=\"EditTools\" href=\"http:\/\/wordsnsync.com\/edittools.php\" target=\"_blank\">EditTools<\/a> in a package with <a title=\"PerfectIt\" href=\"http:\/\/intelligentediting.com\/\" target=\"_blank\">PerfectIt<\/a> and <a title=\"Editor's Toolkit Plus 2014\" href=\"http:\/\/www.editorium.com\/ETKPlus2014.htm\" target=\"_blank\">Editor's Toolkit<\/a> at a special savings of $78 off the price if bought individually. To purchase the package at the special deal price, click <a title=\"Editor's Toolkit Ultimate package\" href=\"http:\/\/wordsnsync.com\/editors-toolkit.php\" target=\"_blank\">Editor's Toolkit Ultimate<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/editorium.com\/archive\/lyonizing-word-we-can-do-this-the-easy-way-or\/\" rel=\"bookmark\" title=\"Permalink to Lyonizing Word: We Can Do This the Easy Way, or . . .\"><p>We Can Do This the Easy Way, or We Can Do This the Hard Way by Jack Lyon American Editor Rich Adin called me recently with a puzzle. He was editing a list of citations that looked like this: Lyon J, Adin R, Poole L, Brenner E, et al: blah blah blah. But his client [&hellip;]<\/p>\n<\/a>","protected":false},"author":9,"featured_media":0,"comment_status":"open","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":[77,256,175,22,409],"tags":[80,267,1001,1002,1003,886],"class_list":{"0":"post-4977","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-computers-and-software","7":"category-contributor-article","8":"category-editing-tools-editorial-matters","9":"category-editorial-matters","10":"category-lyonizing-word","11":"tag-edittools","12":"tag-jack-lyon","13":"tag-replacing-names-in-a-citation","14":"tag-time-is-money","15":"tag-wildcard-macros","16":"tag-wildcarding","17":"h-entry","18":"hentry"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3gfno-1ih","_links":{"self":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/4977","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\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/comments?post=4977"}],"version-history":[{"count":1,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/4977\/revisions"}],"predecessor-version":[{"id":6130,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/4977\/revisions\/6130"}],"wp:attachment":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/media?parent=4977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/categories?post=4977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/tags?post=4977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}