• Find and Replace semicolons with dots in digits (Word 2010)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Find and Replace semicolons with dots in digits (Word 2010)

    Author
    Topic
    #501355

    I am trying to find and replace e.g. clause 1;1;1 with clause 1.1.1 – I have tried inserting in Find: ( ; )[0-9] without spaces and Replace: .^& but I end up with clause 1.;1.;1.; etc. Can anyone please help where I am going wrong. Thanks

    Viewing 2 reply threads
    Author
    Replies
    • #1519657

      I tried this on my Word and it was very simple. In the find what: line I just entered “;” sans quotes. In the replace with: field I entered”.” , agaon sana quotes.
      It replaced all the semi colons perfectly.
      See attachment.
      michael
      41581-Find-and-Replace-01

    • #1519728

      LLSD,

      What you need is a Regular Expression. Try this one:
      41582-Mike37RegEx
      In the Find what:[noparse] ([0-9])(;)([0-9])[/noparse]
      In the Replace with: 1.3
      Check the Use wildcards box.

      Test Text:[noparse]
      This is a test of Replacing semi-colons (;) in numbers with periods (.).
      123;45 This is a sentence with a semi-colon; this should not be replaced
      567;34 and per the poster 1;1;1.[/noparse]

      Results.[noparse]
      This is a test of replacing semi-colons (;) in numbers with periods (.).
      123.45 This is a sentence with a semi-colon; this should not be replaced
      567.34 and per the poster 1.1.1.[/noparse]

      Note: You have to run the F&R more than once as the first run will return 1.1;1 for your numbers! The second run finishes the job.

      HTH :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #1519868

        Thank you so much for your help, this works – I am updating company house style documents and each doc has a table of definitions so I have to change the full stop at the end of each row in the column 2 (description) with a semi colon but not replace the clause numbering dots – have tested this several times and it works perfectly – I will now create a macro.

    • #1519814

      Same as Michael37713 — no problem with the replacement in Word 2010. If there are semi-colons elsewhere that should not be replace, then RG has the right method.

    Viewing 2 reply threads
    Reply To: Find and Replace semicolons with dots in digits (Word 2010)

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

    Your information: