• Find & Replace – another problem variant

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Find & Replace – another problem variant

    • This topic has 3 replies, 4 voices, and was last updated 3 years ago.
    Author
    Topic
    #2437237

    I’ve reviewed previous find and replace topics but I can’t seem to make an expression work for this particular problem:

    I’ve a document where some formatting is corrupt (it was a translation from a PDF).

    There is a date field  eg 02/04/1954 is concenated with the next line that starts with a time eg 0745.   So the line ends up with 02/04/19540745 stuck in the middle of it.

    I’d like to change it to 02/04/1954^p0745  (in essence, you know what I mean).   I’ve tried searching using wildcards for the format xx/xx/xxxxxxxx which is adequately specific but I cannot seem to get it recognized.

    Any advice what a suitable fine/replace expression would be?

    Thanks Richard

     

    Viewing 2 reply threads
    Author
    Replies
    • #2437310

      There is probably formatting you have missed from the search.
      Try copying the data and pasting it into the search box to pick up the formatting.
      Or view the formatting: https://www.online-tech-tips.com/ms-office-tips/show-reveal-formatting-in-word/

      cheers, Paul

    • #2438365

      Hi Richard. Your comment about “searching using wildcards” indicates you’re probably using Word, so maybe try something like this on a copy of your document…

      Press CtrlH to open “Replace” tab on “Find and Replace” box

      Click More>> button (lower left corner of box)

      Check “Use wildcards” checkbox

      Then try using this as Find string:
      ([0-9]{2}/[0-9]{2})/([0-9]{4})([0-9]{4})

      And this as Replace string:
      \1/\2^p\3

      Above strings seemed to test successfully in Office 2016.

      Hope this helps.

    • #2445137

      I’d suggest a wildcard Find/Replace, with:

      Find = ([0-9]{1,2}/[0-9]{,12}/[0-9]{4})([0-9])

      Replace = \1^p\2

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    Viewing 2 reply threads
    Reply To: Find & Replace – another problem variant

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

    Your information: