{"id":421,"date":"2012-01-05T20:09:48","date_gmt":"2012-01-06T04:09:48","guid":{"rendered":"http:\/\/thelawlers.com\/Blognosticator\/?p=421"},"modified":"2023-03-12T18:32:42","modified_gmt":"2023-03-13T01:32:42","slug":"old-school-typing-errors-corrected-with-grep","status":"publish","type":"post","link":"https:\/\/thelawlers.com\/Blognosticator\/?p=421","title":{"rendered":"Old School typing errors corrected with GREP"},"content":{"rendered":"<p><a href=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2011\/07\/Blognosticator-Head.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5\" title=\"Blognosticator Head\" src=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2011\/07\/Blognosticator-Head.png\" alt=\"\" width=\"252\" height=\"115\" \/><\/a><\/p>\n<p>When I was 13, my dad forced me to take a business typing class during summer vacation. It was awful, except for the cute girls who were a bit older, and a lot more sophisticated than I was.<\/p>\n<p>The teacher was a stern woman named Mrs. Potter. She wore hard-heeled shoes that made a <em>clack-clack<\/em> sound on the hardwood floors at the business school.<\/p>\n<p>The typewriters were strictly mechanical, and they had no labels on the keys. It was touch-typing at its worst. Clack-clack-clack.<\/p>\n<p>And, there was no numeral one.<\/p>\n<p>To get a one, you used the lower-case L. So l963 (that was the year) was lower-case L-9-6-3. Did I mention that this was a torturous experience?<\/p>\n<p>I am grateful that my dad did this. He had vision, and he knew that I would need to know how to type in my lifetime. In fact I used my typing skills from that moment onward. I was pretty quick on the keys, and I learned how to use a variety of typewriter-based machines in the years that followed. Those included the <em>Friden Just-O-Writer,<\/em> a clunky typesetting machine that used a typewriter keyboard. When I got to college I had to learn the Linotype keyboard, which really messed up my <em>QWERTY<\/em> typing skills. I substituted <em>ETAOIN<\/em> and <em>SHRDLU<\/em> for the more common typewriter order.<\/p>\n<p>In December an old friend of mine died at the age of 93. She was a newspaper editor, a civic volunteer, a writer, organizer and all around wonderful woman.<\/p>\n<p>Her son sent me a manuscript to use for her memorial booklet, and I placed the text into an <em>InDesign<\/em> document to make it look nice, and to combine the text with some nice family photos of his mother.<\/p>\n<p>Midway through editing the booklet I noticed what I thought was a lower-case L in front of a number for the year. Were my eyes tricking me? No they were not. In fact, <em>all of the numbers one<\/em> were lower-case L\u2019s. I was amused because the author of the text is my age, and his typing habits were, I am sure, developed at the same time as mine.<\/p>\n<p>It was easy to edit these out, replacing them with correct numeral 1\u2019s.<\/p>\n<p>I did it with an InDesign GREP search.<\/p>\n<p>I asked InDesign to search for a letter l (lower case) followed by a wildcard for <em>any digit.<\/em> Then I asked it to replace the lower-case L with the numeral 1 and follow that with the same digit. It took about .5 second to complete the entire search-and-replace on the text.<\/p>\n<p>I could possibly have done it by searching using a standard search string, but the GREP search ensured that I caught <em>all<\/em> of these characters. Some of them were not preceded by a space; some were preceded with a hyphen. It would not have been completely thorough.<\/p>\n<p>The string looks like this to search for the letter \u201cl\u201d followed by any digit.<\/p>\n<p><span style=\"color: #ff0000;\">(l)(\\d)<\/span><\/p>\n<p>\u2026which means \u201csearch for the letter l, assigning it to variable <em>$1,<\/em> followed by <em>any digit,<\/em> assigning that digit to variable <em>$2<\/em>.\u201d<\/p>\n<p>The replace string looks like this:<\/p>\n<p><span style=\"color: #ff0000;\">1$2<\/span><\/p>\n<p>\u2026which means \u201creplace this with a numeral 1, and the original digit found. I drop variable $1 (which is <em>always<\/em> a lower-case L). That is what I am fixing in this search string.<\/p>\n<p><a href=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2012\/01\/GREP-screen.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-422\" title=\"GREP screen\" src=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2012\/01\/GREP-screen.png\" alt=\"\" width=\"460\" height=\"434\" srcset=\"https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2012\/01\/GREP-screen.png 460w, https:\/\/thelawlers.com\/Blognosticator\/wp-content\/uploads\/2012\/01\/GREP-screen-300x283.png 300w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/a><\/p>\n<p><em><span style=\"color: #0000ff;\">This is the InDesign GREP window, showing both search and replace strings. It\u2019s an easy one, but it saves a lot of time and trouble.<\/span><\/em><\/p>\n<p>Modern GREP searches can overcome the typing habits of old guys like me! Even Mrs. Potter would like GREP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I was 13, my dad forced me to take a business typing class during summer vacation. It was awful, except for the cute girls who were a bit older, and a lot more sophisticated than I was. The teacher &hellip; <a href=\"https:\/\/thelawlers.com\/Blognosticator\/?p=421\">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":[16],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-language-and-grammar"],"_links":{"self":[{"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/posts\/421","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=421"}],"version-history":[{"count":4,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions"}],"predecessor-version":[{"id":3587,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions\/3587"}],"wp:attachment":[{"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thelawlers.com\/Blognosticator\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}