Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Nov 2006
    Posts
    97
    Thanks
    11
    Thanked 2 Times in 2 Posts

    Find and Replace: wildcard for whole word

    I have a Word 2010 document in which each line ends with "posted by [firstname] [lastname]", which I want to delete. What I need is a wildcard for a complete word, so that I can run a Find and Replace for "posted by wildcard wildcard" replaced with nothing.

    That is, if two lines end with "posted by John Smith" and "posted by Elizabeth Moore" I want to delete "posted by" and the two following strings, whatever they are.

    I know I could have a macro search for "posted" and use Shift End plus Delete. I'd rather have a whole-word wildcard, though.

    KRS

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,855
    Thanks
    0
    Thanked 177 Times in 163 Posts
    Using a wildcard Find/Replace:
    Find = posted by <*> <*>
    Replace = nothing
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. The Following User Says Thank You to macropod For This Useful Post:

    krsmav (2012-10-07)

  5. #3
    5 Star Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    1,107
    Thanks
    39
    Thanked 197 Times in 184 Posts
    Try in the Find what: (posted)> <*> <*> <*>
    Replace with: ""
    Translated, it is saying, find the word posted and the next 3 words following it. Note the spaces between the 4 expressions.

    HTH,
    Maud

  6. The Following User Says Thank You to Maudibe For This Useful Post:

    krsmav (2012-10-07)

  7. #4
    Star Lounger
    Join Date
    Nov 2006
    Posts
    97
    Thanks
    11
    Thanked 2 Times in 2 Posts
    Great! I went through a dozen wildcard lists but didn't find <*>.

  8. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,855
    Thanks
    0
    Thanked 177 Times in 163 Posts
    Quote Originally Posted by Maudibe View Post
    Try in the Find what: (posted)> <*> <*> <*>
    Replace with: ""
    Translated, it is saying, find the word posted and the next 3 words following it. Note the spaces between the 4 expressions.
    Hi Maud,

    The problem with your approach is that it would also delete "posted to x x", "posted on x x", etc. Also, having '(posted)> ' is superfluous - it achieved nothing more than 'posted '
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •