Avatar of Stephen Kairys
Stephen Kairys
Flag for United States of America asked on

Word 2016 - Wild card method to search for "ing" word at beginning of sentence?

Hi,

For editing my novel, I'm looking for sentences that begin with a word (verb) ending in "ing". e.g.

"Smiling, she reached for her wine."
"Gaining speed, he passed three other runners."

The pattern here would be.
<Capital letter><one or more characters><"ing">

Can Word's wildcard feature handle such a search?

Thanking you, ;)
Steve
Microsoft OfficeMicrosoft Word

Avatar of undefined
Last Comment
Stephen Kairys

8/22/2022 - Mon
Paul Sauvé

use Find
select Use wildcards box
click on Special button
select End of word >
type ing BEFORE the > character
now click on Find next
ING
John

There is an Advanced Find and it finds an occurrence but highlights everything to the occurrence so seems to have some limitations.

Word-2016-Advanced-Find
Stephen Kairys

ASKER
Paul and John,
Sounds like a start. But, can we enhance the above to specify that the word starts with a capital letter? Thanks.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
John

I spent some time on this and cannot find a way to isolate the wanted letters. That is because the preceding part could be anything. Try without wildcards , but then the find results could be anywhere in the document
Stephen Kairys

ASKER
@John,
Why do you think that finding results "anywhere in the document" or "highlighting everything" would be an issue? Maybe I didn't phrase my question clearly? The point of this exercise is to find all --ing words that begin a sentence throughout the entire novel. The initial capital letter is needed so it will ignore something like "He was walking down the road...."

Thanks.
John

Because Word does not know what is on front or at the end so if finds everything up to. I tried several times and it works the same way every time.  I cannot make it isolate a space (because spaces are legitimate) so it finds everything up to, at least in my attempts thus far
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Paul Sauvé

have to agree with John - Word does not know if the word ending with ing is at the beginning, middle or end of the sentence. i also tried several ways to do this with no joy!

by highlighting all the words ending with ing, then you will at least see those that are at the beginning of a paragraph
Stephen Kairys

ASKER
OK, I'll settle for highlighting. So, now a question.

@John - in the FIND WHAT field, you have >*ults. What's the purpose of the * ?  
And how do I enable highlighting?

Thanks.
John

I was using that as a test to find the word endings in ults so results
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Stephen Kairys

ASKER
OK, got it. But, when I tried >*ing, it found a phrase e.g.

"hovered overhead, looming:

When I did ing> it seems to find only whole words.

And, I got the highlighting to work....it highlights the "ing" in any word ending with "ing", but in gray. Can I make it yellow or green?

Thanks!
John

To the latter point, I do not know how (of if) you can change the highlighting colour.
Stephen Kairys

ASKER
OK, let me play around with that. I could swear I tried highlighting some time back and it was yellow, but I could be wrong.

John, I want to give you credit for this question, so would you be able to repost your original comment using ing> instad of >*ults?

Thanks.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Daryl Bamforth

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Stephen Kairys

ASKER
Hey Daryl,
I'll try your suggestion in a bit. Thank you for this idea.

What is the purpose of having both [a-z] and @ ?
Daryl Bamforth

@ allows you to search for 1 or more occurrences of the previous character or match.

So if you had
lo@t

Open in new window


It would match 'lot' and 'loot', in your case you are wanting a word that is the beginning of  a sentence (starting with a capital letter) and so we first match on any word that begins with a capital letter. If however we were to put @ after this we would only search for words that were all capital letters, ie TRAINING. Instead we now match on a lower case letter. We could continue this on using multiple [a-z]'s but that would only match exactly on how many we put in.

If you had
<[A-Z][a-z][a-z][a-z][a-z]ing>

Open in new window


You could match on Training (Match on 'Train' + ing) but not Sing (match on S fail on missing 4 additional lower case letters). As we don't know how long the word is going to be we use @, this will match any word from Sting to Uncompromising, but not flailing as it doesn't begin with a capital letter.

And whilst typing this out just realised it's limitation in terms of 4 letter words, So you will need another search just for them
<[A-Z]ing>

Open in new window


As to your yellow highlighting, if you use the Advanced find window it will highlight it in grey, if you use the Navigation search document it will highlight all matches in yellow.
Stephen Kairys

ASKER
OK, makes sense. I'll try it in a bit.

Wondering: Would it not match something like "Ruing"?  Since the @ means "1 or more" not "0 or more" ?  "He was ruing the turn of events..."

Thanks.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Daryl Bamforth

It would match that as the u is the 1st occurrence.

WordMatch.JPG
Daryl Bamforth

Hmm, give me a few mins, thought of a way to fix it, testing now.
Stephen Kairys

ASKER
<[A-Z][a-z]@ing>

Open in new window


@Daryl  - the above found no matches, in the FIND dialog box. Do I need to use the Navigation pane? If so, how do I access it? Thanks.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
John

I think you will find that the navigation pane leads to the same advanced find
Daryl Bamforth

Bah Microsoft doesn't have any wildcard for 0 or more matches, unfortunately, so will need to be 2 searches, 1 for 4 letter words, 1 for more than 4 letters.

Can you supply a bit of text you are expected text?

I just ran it against

"Smiling, she reached for her wine."
"Gaining speed, he passed three other runners."
And it matched the first word in both sentences.

What version of word are you using?
John

I was using Word 2016 and I think Steve is as well
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Daryl Bamforth

CTRL + F will bring up navigation windows, or just clicking the 'find' (not the down arrow)  button once.
John

Yes but the find underpinnings are the same in the end (at least in my system)
Daryl Bamforth

It does, but Navigation will highlight all occurrences in a document. Advanced Find will 'Find Next' occurrence either up or down.

Stephen, sorry I misread your comment. It will work in either find method. Did you remove the '1:' from the command? That is added by the forum software when you list a line of code.

For instance

Line 1
Line 2

But when wrapped in code tags becomes
Line 1
Line 2

Open in new window


I have attached a screenshot of the Advanced find working.
Word2016_AdvancedFind.jpg
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Stephen Kairys

ASKER
Please look at this screenshot and attached docx. Still not working for me. (Word 2016.)
Find ING not found
No rush on responding, as I'm getting ready to head out to dinner.

PS- Daryl, did you mean two commands would be needed if I need to handle words like "Ruing"? If so, no big deal, such verbs are few and far between, at least in my novel. :)

Thanks, everyone!
IngTest.docx
Daryl Bamforth

You need to tick use wildcards.

No 1 for 4 letter words (Ring, Sing) 1 for more than 4 letter words (Ruing, Bring).
John

Even when I did that (way back here) it did not work for me. I think it is a basic limitation of the Word 2016 Find.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Daryl Bamforth

@John, sorry can you elaborate? Which bit didn't work for you? Ticking Use wildcards?
John

Yes. I set up a search with Wildcards and the advanced function and it search from the beginning to the point of my find. That is what Paul and I posted earlier. I have not really been able to progress past that even though trying different things.
Daryl Bamforth

@John. Both of my screenshots are showing the matches from the string, don't know why yours wouldn't be working.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
John

I must have missed something in my test. If I go back to <[A-Z][a-z][a-z][a-z][a-z]ing> in my search, it DOES work and goes back just to the beginning of the word where it found "ing"  So that part works better than a simple advanced search.
Stephen Kairys

ASKER
@Daryl - Yes! Checking the Wildcard box seems to work. Will test it further tomorrow or Monday.

Btw, I realized my parameters are not perfect per ING words starting a sentence. If your text has (e.g.) the name of a business such as
"The Running Store", "Running" will generate a match. But, I can deal with these exceptions.

Thanks again.
Daryl Bamforth

No problem. Once you have wildcard ticked it will work in 'Navigation' find as well (which will find all occurrences and highlight them yellow, navigate using the 'Results' tab) as well as, very helpfully, telling you how many matches it found.

Enjoy :)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Stephen Kairys

ASKER
Thanks. Please remind me, how do i activate the 'Navigation' tab?

Also, is there a way for Word to "remember" this esoteric "Find" criteria so I don't have to type it each time?
Daryl Bamforth

Just using CTRL+f or click the 'Find' Button.

It should remember it in the find history, if you click the drop down arrow next to the field (in advanced find) it will show you your find history
Stephen Kairys

ASKER
OK, I'm in the FIND dialog via CTRL-f. But, the dropdown shows nothing.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
John

You need to pull down the little arrow to get the advanced functions to enter what you want (only in Advanced)

Word-2016-Advanced-Find-2
The basic Find / Advanced Find is all the same structure no matter how you approach it.

Then as Daryl has mentioned, used the Find History to remember the construct. I would write it down in case History vanishes. I was not aware of the very advanced find construct either.
Stephen Kairys

ASKER
@John,
I never see the Navigation Pane. I vaguely recall that I disabled it a long time ago...maybe I need to change some option? Thanks.
John

In Word, in the Ribbon, click on Find and the Navigation Pane opens. Or use Ctrl-F as Daryl notes.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Stephen Kairys

ASKER
Hmmm...OK I went to FIND --> ADVANCED FIND and all I see this the below.

Find screenshot
OK, will check back later today. Off to volunteer at the NYC Marathon. :)
SOLUTION
John

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Daryl Bamforth

Couple screenshots to hopefully clear things up.

Note, you can click the word 'Find'. You don't have to click the down arrow and then select Find. Please ignore the typo .. I couldn't be bothered re-typing it all out and taking another screenshot :D
 Bringing up Navigation Pane from 'Home' Tab.
You can also get to it from the View tab by clicking the 'Navigation Pane' tick box under 'Show'
Bringing up Navigation Pane from 'View' Tab
Search history can only be viewed when you click the down arrow in Advanced Find.
Search History
In the Navigation Pane you can jump to advanced find .. or you can set the 'Advanced' options, including an additional 'Highlight All' that is specific to the Navigation Pane. You can also change these settings to be your default settings.
Navigation Pane
As to the viability of using the search history to save the query? I would avoid it to be honest. Create a 'Useful Word Searches' document/note and store it with your Work items so you also have it backed up.
Stephen Kairys

ASKER
@John- good point on clicking MORE to access the additional options. :) Thanks.
@Daryl - Thanks for the additional info. Will check later this evening or tomorrow.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Stephen Kairys

ASKER
I wonder how far back the search history is saved. I see some items that may be from today only....I'll be curious to see what vanishes in the morning.

Also, I don't see the SET AS DEFAULT option in the Find Options....

Thanks.
John

Set as Default in the Navigation Pane pull down where we both showed you. Options is one of the first listed and Set as Default is there.

So far however, using the same document, after I have exited the document (normal for me) there is no history.
SOLUTION
John

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Stephen Kairys

ASKER
@John. Good call on the Notepad file.

Now, here's something weird. I was going through my doc and it found an instance on page 243. When I clicked FIND NEXT, it jumped to the title page. I clicked FIND NEXT again and it jumped to an instance on page 257. What's up with that? :)
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
John

I always start at the beginning of the document to search. I am not sure why it would skip by 243 on the second try unless it is recording what it found in this search.
Stephen Kairys

ASKER
Well, I had started at the beginning. But, since it's a long doc, I had left off around page 130 and resumed there this morning. So, it wasn't really a second try. Btw, the same thing happened again at a latter page...jump to beginning...and jump back to what I think was the next match.
John

I do not know for sure, but my guess is that the search is somehow caching results and not giving you what you already got, but I am not certain about that.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Stephen Kairys

ASKER
All,
I have not forgotten about this question. Have been immersed in both the day job and novel. Will close and assign points within the next few days. Thank you again!

Steve
Stephen Kairys

ASKER
@Daryl,

I just tried the search one more time, and - poof - it's not working. I must be missing something obvious b/c I didn't have my orange juice with breakfast... ;)
Wildcard issue
Please check out this screenshot. I am also attaching the doc in question. Please forgive the corniness of the dialogue. :)

 

Thanks.
IngSearchNotWorkingToday.docx
John

It did not work for me in this document above. I will have to spend some time on it later today. The technique worked in a document of mine but not this one above.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
John

I don't know.
John

Also it occurs to me that Office 2016 has been updated at least once since you started this.
Stephen Kairys

ASKER
@John
When you say the technique worked on "a document of mine", was that today or  a while ago? I assume the former. Thanks.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
John

Yes, back in early November. I cannot see why this current document of yours does not work for you and does not work for me.
Stephen Kairys

ASKER
Does Microsoft publish release notes? Maybe they "changed" that feature to use a different wildcard or something.
John

You would have to Google for Office 2016 changes.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
John

Hello Steve, it was patch Tuesday today and there was a substantial Windows 10 update followed by numerous Office 2016 updates. The wildcard approach we were using here is not working at all.

I don't know whether Daryl can shed any light.
Stephen Kairys

ASKER
So, how do we close this question? You guys have put in so much effort, so you deserve credit. But, I can't tag your comments as a solution lest other users find this question in a search.  Fortunately, I'm done with the editing phase that required this search, but, perhaps others may have the same question.

I'm going to suggest leaving this question open for a while to see if Microsoft fixes it.

Thanks.
Daryl Bamforth

There doesn't appear to be any text in that document you supplied that it should match on....

What word were you expecting it to highlight?

The pattern it is looking for is as specified right at the top..

The pattern here would be.
<Capital letter><one or more characters><"ing">

None of your 'ing' words in that section of text start with a capital letter. If you changed 'tearing' to 'Tearing' you will find it now matches.

Also,
<[A-Z][a-z]@ing>

Open in new window


only works on words that are 5 or more characters. For words of 4 characters (such as 'Ring') you would just remove the '[a-z]@' section as that becomes irrelevant.

<[A-Z]ing>

Open in new window


If you want to get lower case words (such as the 'ring' bits of your supplied text) then you need change the [A-Z] to [a-z] .. OR to match on upper or lower case as first letter you could change it to [A-Z,a-z], so

<[A-Z,a-z]@ing>

Open in new window


Ultimately you need to decide what it is you need to search for, as the search string was very specific to ensure it didn't get words that didn't match the original pattern.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Stephen Kairys

ASKER
OMG, my bad. Of course!  I forgot the premise of my original question.

As I said this morning:

>> I must be missing something obvious b/c I didn't have my orange juice with breakfast... ;)

Will close this question out within a day. Thanks Daryl and John and sorry to have wasted your time....
Daryl Bamforth

No worries :)  Easily done.
SOLUTION
Stephen Kairys

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Stephen Kairys

ASKER
Daryl: Thank you for your elegant solution.
John: Thanks for the assists along the way, including the great suggestion to store the find parameters in a text file.

NOTE: I credited myself (no points) with an assisted solution to help anyone viewing this question to see one possible caveat.

This one was fun. EE rocks!
Your help has saved me hundreds of hours of internet surfing.
fblack61
John

You are very welcome and I was happy to work with both you and Daryl.
Stephen Kairys

ASKER
@Paul - Thanks for your contribution at the top. Even though I ended up not using your solution, I appreciate the effort.