Consulting

Results 1 to 3 of 3

Thread: Need help with Find and Replace

  1. #1
    VBAX Regular
    Joined
    Apr 2011
    Posts
    72
    Location

    Need help with Find and Replace

    HI all,

    i have a document with numbers in bracket like this:

    [241:1]
    [290:11]

    Also, I have numbers in brackets without the semicolon

    [243]
    [250]

    Therefore, and with your help I would like to be able to delete or remove the brackets and the numbers without the semicolon only.

    Can someone assist me?

    Thanks!

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,137
    Location
    On a sample document try the following by doing a Find and Replace

    Find: \[[0-9]{1,6}\]

    Replace: " "

    This came from the following website https://cybertext.wordpress.com/2020...r-parentheses/

    You can change the value 6 to 3 if the numbers only contain a maximum of 3 digits.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Regular
    Joined
    Apr 2011
    Posts
    72
    Location
    Hello Aussiebear, thank you very much for the code. Didn't have time until now to tested.

    Working great! Much appreciated!

    Thanks!

Posting Permissions

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