• How to do search for hyphens

    Author
    Topic
    #500786

    I’m using Word 2010 (Windows 7). I converted a PDF to Word and I’m trying to clean things up. I have a lot of words with hyphens in the middle of them that shouldn’t be there. What sort of an expression would I use to search for these and replace what I find, minus the hyphen? Thanks.
    Clark

    Viewing 3 reply threads
    Author
    Replies
    • #1513714

      If it were me I’d just use the Edit, Find and Replace feature to delete the hyphens. Even with an expression or macro there will still remain the issue of whether the hyphen should actually exist in some instances, hopefully spell check or grammar check will see those.

      Before you wonder "Am I doing things right," ask "Am I doing the right things?"
    • #1513721

      Clark,

      You can use the following regular expression in the Find what: box

      Code:
      ()(-)(<[a-z,A-Z])

      And this in the Replace with: box

      Code:
      13

      Make sure to check the Use wildcards check box.
      41265-FindandReplaceRegEx

      Of course you'll try this on a COPY of your document!

      HTH :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1513759

      If you don’t have any hyphens that you do want, just put a hyphen in the Find box and leave the Replace box blank. All hyphens will be replaced with…er, nothing.

    • #1513763

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    Viewing 3 reply threads
    Reply To: How to do search for hyphens

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: