Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 05-11-2019, 03:47 AM
Paul Cardin Paul Cardin is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Wirral, Merseyside
Posts: 9
Paul Cardin is on a distinguished road
Send a message via AIM to Paul Cardin Send a message via MSN to Paul Cardin Send a message via Yahoo to Paul Cardin
Default Using wildcards to highlight certain text

Hi,

I would like to highlight special instances of text in a Word document by using wildcards. I've searched widely, but my particular circumstances don't appear to be catered for.

I'd like to transform ALL instances of [word [timestamp]] in a document, e.g. [inaudible [12:34]] so that the square brackets and all the contents are highlighted in yellow in one press, after set-up.

I've tried the dialog box for find and replace / wildcards, etc. but cannot find a way through to achieving this with what would ultimately be one button press !



I thought I had it at one point when I set it up, pressed enter, and all my examples were highlighted in yellow...

...BUT the original text was lost, and replaced with hundreds of[*]s. Hope someone can help because the time saved compared to doing this manually would be enormous,

Many thanks, Paul
Reply With Quote
  #2  
Old 05-11-2019, 04:09 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,155
Guessed has a spectacular aura aboutGuessed has a spectacular aura aboutGuessed has a spectacular aura about
Default

Try searching for this
\[inaudible \[[0-9]{2}:[0-9]{2}\]\]

Don't put anything in the replace with field but turn on the highlight setting (and make sure the last used highlight was the colour you want)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 05-11-2019, 04:46 AM
Paul Cardin Paul Cardin is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Wirral, Merseyside
Posts: 9
Paul Cardin is on a distinguished road
Send a message via AIM to Paul Cardin Send a message via MSN to Paul Cardin Send a message via Yahoo to Paul Cardin
Default

Quote:
Originally Posted by Guessed View Post
Try searching for this
\[inaudible \[[0-9]{2}:[0-9]{2}\]\]

Don't put anything in the replace with field but turn on the highlight setting (and make sure the last used highlight was the colour you want)

Thanks, but when I press 'Replace All' it's returning... 'All done. We made 0 replacements'.

If I press 'Find Next', it returns... '0 results found'.
Reply With Quote
  #4  
Old 05-11-2019, 04:04 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,390
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Did you check the 'use wildcards' option?

For an ordinary Find/Replace, you might use:
Find = [inaudible [^#^#:^#^#]]
Replace = ^&
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 05-11-2019, 10:16 PM
Lugh's Avatar
Lugh Lugh is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: May 2019
Location: USA
Posts: 33
Lugh is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
Try searching for this
\[inaudible \[[0-9]{2}:[0-9]{2}\]\]
Quote:
Originally Posted by Paul Cardin View Post
when I press 'Replace All' it's returning... 'All done. We made 0 replacements'.
Is there actually some text in your document which is "inaudible " and a time stamp. Just in case you were only giving a random example which doesn't actually exist.
__________________
Windows 10 Home x64 1803, Office 365 monthly channel
Main MSOs: Word, Excel, Access, OneNote, Outlook
Reply With Quote
  #6  
Old 05-11-2019, 10:20 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,390
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

And, since it might be any word, not just 'inaudible', you might use a wildcard Find/Replace like:
Find =\[<*> \[[0-9]@:[0-9]@\]\]
Replace = ^&
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #7  
Old 05-12-2019, 01:29 AM
Paul Cardin Paul Cardin is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Wirral, Merseyside
Posts: 9
Paul Cardin is on a distinguished road
Send a message via AIM to Paul Cardin Send a message via MSN to Paul Cardin Send a message via Yahoo to Paul Cardin
Default

Quote:
Originally Posted by macropod View Post
Did you check the 'use wildcards' option?

For an ordinary Find/Replace, you might use:
Find = [inaudible [^#^#:^#^#]]
Replace = ^&
Many thanks.

With the Wildcards Option checked, on pressing Replace All, I get: "^# is not a valid special character for the Find What box or is not supported when the Use Wildcards check box is selected".

When I uncheck the Use Wildcards check box and press Replace All, I get: "All done. We made 0 replacements".

If I press Find Next in either case, I get: No results found.

I haven't tried your second suggestion yet
Paul
Reply With Quote
  #8  
Old 05-12-2019, 01:33 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,390
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by Paul Cardin View Post
With the Wildcards Option checked, on pressing Replace All, I get: "^# is not a valid special character for the Find What box or is not supported when the Use Wildcards check box is selected".
Well, I did describe
Find = [inaudible [^#^#:^#^#]]
as an ordinary Find/Replace...
Quote:
Originally Posted by Paul Cardin View Post
When I uncheck the Use Wildcards check box and press Replace All, I get: "All done. We made 0 replacements".
In that case, the content isn't as you described...
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #9  
Old 05-12-2019, 01:34 AM
Paul Cardin Paul Cardin is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Wirral, Merseyside
Posts: 9
Paul Cardin is on a distinguished road
Send a message via AIM to Paul Cardin Send a message via MSN to Paul Cardin Send a message via Yahoo to Paul Cardin
Default

Quote:
Originally Posted by macropod View Post
And, since it might be any word, not just 'inaudible', you might use a wildcard Find/Replace like:
Find =\[<*> \[[0-9]@:[0-9]@\]\]
Replace = ^&
Similar to the last one, with Wildcards check box checked / not checked, pressing Replace All gets: "All done. We made no replacements".

Find Next gets: "No results found".

But characters

Did I stumble across a problem that has no solution?!

thanks,
Paul
Reply With Quote
  #10  
Old 05-12-2019, 01:34 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,390
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

I repeat:
In that case, the content isn't as you described...
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #11  
Old 05-12-2019, 01:35 AM
Paul Cardin Paul Cardin is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Wirral, Merseyside
Posts: 9
Paul Cardin is on a distinguished road
Send a message via AIM to Paul Cardin Send a message via MSN to Paul Cardin Send a message via Yahoo to Paul Cardin
Default

Quote:
Originally Posted by macropod View Post
Well, I did describe
Find = [inaudible [^#^#:^#^#]]
as an ordinary Find/Replace...

In that case, the content isn't as you described...
Here's a direct example of the content:

[inaudible 12:34]

Thanks,
Paul
Reply With Quote
  #12  
Old 05-12-2019, 01:36 AM
Paul Cardin Paul Cardin is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Wirral, Merseyside
Posts: 9
Paul Cardin is on a distinguished road
Send a message via AIM to Paul Cardin Send a message via MSN to Paul Cardin Send a message via Yahoo to Paul Cardin
Default

Quote:
Originally Posted by Lugh View Post
Is there actually some text in your document which is "inaudible " and a time stamp. Just in case you were only giving a random example which doesn't actually exist.
100s of varying timestamps, but it's:

[inaudible 23:45]

thanks,
Paul
Reply With Quote
  #13  
Old 05-12-2019, 01:55 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,390
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

That is NOT what you described in post #1, which was:
Quote:
instances of [word [timestamp]] in a document, e.g. [inaudible [12:34]]
Your [inaudible 23:45] lacks the square brackets around the time!

Try a wildcard Find/Replace like:
Find =\[<*> [0-9]@:[0-9]@\]
Replace = ^&
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #14  
Old 05-12-2019, 03:50 AM
Paul Cardin Paul Cardin is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Wirral, Merseyside
Posts: 9
Paul Cardin is on a distinguished road
Send a message via AIM to Paul Cardin Send a message via MSN to Paul Cardin Send a message via Yahoo to Paul Cardin
Default

Quote:
Originally Posted by macropod View Post
That is NOT what you described in post #1, which was:

Your [inaudible 23:45] lacks the square brackets around the time!

Try a wildcard Find/Replace like:
Find =\[<*> [0-9]@:[0-9]@\]
Replace = ^&
Thanks Paul...

...we're getting closer...

I use this, checked the wildcards check box, pressed Replace All and it responded: "All done. We made 54 replacements".

However there are only 32 instances of [inaudible 12:34] (with varying time stamps) in the document, and none of them had been highlighted in the chosen colour (yellow).

When I did the same with the wildcards check box unchecked it responded: "All done. We made 33 replacements".

In this document, which is one of many transcriptions I do, I have variables such as [voices overlap 12:34] and [wordguess 12:34] where I make a guess at an uncertain word. You posted something earlier aimed at dealing with this situation where the text varies, and something to address all of these including "inaudibles" would be the ideal.

Apologies to all for leading you up the garden path with incorrect information initially!

Paul
Reply With Quote
  #15  
Old 05-12-2019, 03:57 AM
Paul Cardin Paul Cardin is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Wirral, Merseyside
Posts: 9
Paul Cardin is on a distinguished road
Send a message via AIM to Paul Cardin Send a message via MSN to Paul Cardin Send a message via Yahoo to Paul Cardin
Default

Quote:
Originally Posted by macropod View Post
That is NOT what you described in post #1, which was:

Your [inaudible 23:45] lacks the square brackets around the time!

Try a wildcard Find/Replace like:
Find =\[<*> [0-9]@:[0-9]@\]
Replace = ^&
Just discovered, when I press Find Next, it highlights in grey perfectly the limits of each example including all varied texts, as follows:

[inaudible 04:22]

[in England 05:34]

[inaudible 06:07]

[voices overlap 07:21]

...and so on.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
like to highlight web text, enter cntl key, have text appended to same onenote pate bobk544 OneNote 0 12-10-2017 11:49 AM
Using the mouse to highlight text ukthesis Word 7 08-04-2017 07:24 PM
word wildcards I need to replace actual text that contains [ and ] larsmula Word 2 02-20-2014 09:18 AM
Help with replacing text with wildcards sbatson5 Word 2 04-13-2012 03:49 AM
find - reading highlight - highlight all / highlight doesn't stick when saved bobk544 Word 3 04-15-2009 03:31 PM


All times are GMT -7. The time now is 11:18 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft