![]() |
#1
|
|||
|
|||
![]()
As you can see from the examples below, I would like to remove the number right after a square bracket, but only if it is a direct match to the number before the square bracket.
Before [Philippians 3:12-13] 12 Not that I have [Joshua 3:5] 5 Then Joshua [Romans 7:21] 21 I find then After [Philippians 3:12-13] 12 Not that I have [Joshua 3:5] Then Joshua [Romans 7:21] I find then |
#2
|
||||
|
||||
![]()
Search with wildcards
Find: ([0-9]{1,2})\] \1 Replace: \1]
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
![]()
That works great Andrew. Thank you.
|
#4
|
||||
|
||||
![]()
Note that an example like the following would also be found with that string and you might not want that.
[Philippians 3:12-13] 13 Not that I have You could add the colon into the mix if that was an issue.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
![]()
Hi Andrew,
Yes your right, it does strip out the number. [Philippians 3:12-13] Not that I have I am terrible at these patterns, so if you could, how would you add in the colon? |
#6
|
||||
|
||||
![]()
Find
Code:
:([0-9]{1,2})\] \1 Code:
:\1]
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#7
|
|||
|
|||
![]()
Hi Andrew,
That's telling me 0 replacement made. |
#8
|
||||
|
||||
![]()
It's working on my machine and it looks right on yours.
Perhaps you can reveal the spaces on your machine so you can verify that there is only one regular space after the square bracket in the document you are searching.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#9
|
|||
|
|||
![]()
Yes, sorry, you are right. There where extra spaces. It's all good now.
Thanks Andrew |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Want to remove this square thing | tonythegreek | Word | 1 | 09-22-2018 02:08 PM |
How remove a repeated text box from all slides in PowerPoint | FlashPoint | PowerPoint | 10 | 01-08-2018 08:44 AM |
Word 2010 - Remove square-bracket encased string in large document | IntestinalWorm | Word | 1 | 06-20-2017 01:14 AM |
![]() |
pablrodr | Word | 4 | 09-11-2015 01:00 AM |
![]() |
rahul4msoffice | Word | 1 | 05-01-2013 11:35 PM |