Say I have the following string:
"Hello how are you."
Since MS Word allows for regular expressions, I can use "*" to find the complete string. But what if I want to exclude the delimiters (the quotes)? I’m afraid that MS Word doesn’t support either of the two methods explained here. My question is: would there be any way to do this in one search query?
Thanks in advance.
There are different ways to achieve what you want. Here is one way to find text in VBA Word without the dilimiters using Regex. Let’s say you have the following text in Word Document (do not copy and paste it from here as the the website distorts the Double quotes. See the screenshot)
The code to return text using Regex between two quotes is as follows
and if you want to say find
"Wake me up before you go go"without quotes then you can use this as wellNOTE: The website distorts the actual double quote so I am posting screenshots.
FOLLOWUP
For the sample file that you posted, use this code
Sample File can be downloaded from here. Please note that this link will be active for 7 days.
Sample File
HTH
Sid