Loading ...
Sorry, an error occurred while loading the content.

Regular Expression Search

Expand Messages
  • John Rethorst
    A group member liked my recently-posted WP Regular Expression Search utility, and pointed me to a MacWorld article about this advanced kind of find/replace in
    Message 1 of 1 , Apr 22, 2006
    • 0 Attachment
      A group member liked my recently-posted WP Regular Expression
      Search utility, and pointed me to a MacWorld article about this
      advanced kind of find/replace in MS Word:

      http://www.macworld.com/2004/09/secrets/wordgrep/index.php

      which had a good example of the power of regular expression
      search in word processing. Say you have a list of a thousand names
      in this format:

      Fred A. Harris
      Anna C. Martin
      Joe M. Jones

      and you need to change them all to the form:

      Harris, Fred A.

      A lot of work - or use WP Regular Expression Search, free in the Files
      section here. You'd enter:

      ([A-Za-z]+) ([A-Z]\.) ([A-Za-z]+)

      in the search box (the syntax isn't hard after you've done it a few
      times), and put:

      \3, \1 \2

      in the Replace box. Click Replace, enjoy your cup of coffee, and watch
      the computer do the work, as it should.

      This kind of power gives the term word _processing_ a more literal
      meaning. There's no reason anyone should have to do that kind of
      thing by hand.

      Or, apparently, with Microsoft software. In the article's sidebar,
      MacWorld says:

      "Also, some codes supplied by Word's documentation don't work.
      With luck, later versions of Word will squash these bugs."

      That's good to hear.

      John R.
    Your message has been successfully submitted and would be delivered to recipients shortly.