{"id":1569,"date":"2014-01-24T18:10:24","date_gmt":"2014-01-25T02:10:24","guid":{"rendered":"http:\/\/thelawlers.com\/Blognosticator\/?p=1569"},"modified":"2014-01-27T05:18:24","modified_gmt":"2014-01-27T13:18:24","slug":"another-grepping-drama","status":"publish","type":"post","link":"https:\/\/thelawlers.com\/Blognosticator\/?p=1569","title":{"rendered":"Another GREPping drama"},"content":{"rendered":"<p><a href=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2013\/09\/Blognosticator-Head.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1237\" alt=\"Blognosticator Head\" src=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2013\/09\/Blognosticator-Head.png\" width=\"252\" height=\"115\" \/><\/a><\/p>\n<p>My dear wife is producing a book for a local author. He has typed his own manuscript in Microsoft Word, and it\u2019s going to be about 300 pages.<\/p>\n<p>The author has a habit of substituting the letter l (el) for the numeral 1, and is not entirely consistent about it.<\/p>\n<p><a href=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/189l.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1570\" alt=\"189l\" src=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/189l.png\" width=\"940\" height=\"222\" srcset=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/189l.png 940w, https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/189l-300x70.png 300w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><\/a><\/p>\n<p><em><span style=\"color: #0000ff;\">In this example, the letter l is used instead of the numeral 1. It\u2019s pretty obvious here, but in a 300-page manuscript it\u2019s harder to find. Using GREP, one can fix all of the possible conditions where this might happen.<\/span><\/em><\/p>\n<p>I remember my typing classes in the early 1960s on clunky mechanical typewriters. Back then the numeral 1 wasn\u2019t even on the keyboard. Using the l key instead was the only way to do it.<\/p>\n<p>So, as he types he occasionally types l950, or l970s, or 196l, or some combination of those uses of the letter instead of the number.<\/p>\n<p>This evening my wife and I spent a few minutes to fix all of the errors in the book using InDesign\u2019s implementation of GREP. It involves just two search strings, and it zooms through the entire manuscript in about one second each, repairing the els, replacing them with ones.<\/p>\n<p>There are only two possibilities of l\u2019s showing up in numbers in his text:<\/p>\n<p>l followed by a numeral (as in l9&#8230; or l8&#8230;)<\/p>\n<p>a numeral followed by l, (as in &#8230;6l or &#8230;8l)<\/p>\n<p>And, to fix them, one uses the <em>Find and Replace<\/em> function in InDesign. Choosing the GREP tab, let\u2019s find the first examples, those of l followed by a numeral. Following is the GREP search string for letter l followed by\u00a0any digit:<\/p>\n<p><a href=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/GREP-for-letter-1.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"GREP for letter 1\" src=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/GREP-for-letter-1.png\" width=\"684\" height=\"288\" \/><\/a><\/p>\n<p>And, this is the GREP search for the opposite situation, any digit\u00a0followed by\u00a0the letter l:<\/p>\n<p><a href=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/GREP-for-letter-1-21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1598\" alt=\"GREP for letter 1 2\" src=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/GREP-for-letter-1-21.png\" width=\"684\" height=\"267\" srcset=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/GREP-for-letter-1-21.png 684w, https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2014\/01\/GREP-for-letter-1-21-300x117.png 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/a><\/p>\n<p>It\u2019s smart when searching with GREP to use the <em>Find<\/em> button, then the <em>Find\/Change<\/em> for subsequent searches rather than the <em>Change All<\/em> button. This, in case you have made an error in entering the GREP command. It prevents new errors from being inserted into the manuscript. Once it looks like it\u2019s working correctly, it will be safe to click on <em>Change All.<\/em><\/p>\n<p>Once that set of searches is complete, reverse the commands to search for the other pattern, and do it again. The whole process takes less time than it took me to write this blog entry.<\/p>\n<p>And, <em>it\u2019s fun!<\/em><\/p>\n<p>(We geeks love GREP)<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My dear wife is producing a book for a local author. He has typed his own manuscript in Microsoft Word, and it\u2019s going to be about 300 pages. The author has a habit of substituting the letter l (el) for &hellip; <a href=\"https:\/\/thelawlers.com\/Blognosticator\/?p=1569\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,25,26],"tags":[330,332,331,333],"class_list":["post-1569","post","type-post","status-publish","format-standard","hentry","category-printing-and-printing-processes","category-software-2","category-typography-2","tag-grep-in-indesign","tag-grep-search","tag-grep-searches","tag-indesign-grep"],"_links":{"self":[{"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/posts\/1569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1569"}],"version-history":[{"count":7,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/posts\/1569\/revisions"}],"predecessor-version":[{"id":1599,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/posts\/1569\/revisions\/1599"}],"wp:attachment":[{"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}