I'm attempting to use GREP to search for any lines that contain the following: "word or words": Then change it to: "word or words":
The problem is not changing it's finding. I'm using this string to try to find these words or phrases in parentheses with the column at the end: (")(\w+)(")(:)
Thus far it works great at finding what I want with one exception. It can't find any multiple words in parentheses it can only find cases with sing words. As far as I understand (\w) should find "Any Word" but in this line there is a + which means One or More Times, yet it only find One time Not One Or More. Could someone please help me understand why this is not working the way it appears it should be?
It's not working because multiple words have spaces between them, and you aren't allowing for that.
I suspect what you really want to find is (".+?"): though I haven't tested. That ought to find the shortest match of anything between quotes and followed by a colon.
I ended up trying (.+) instead of (\w+) and it worked. Thanks for the tip.
You do want to include the ? for shortest match, though, or you'll get everything between the first open quote and last close quote in cases whre there is more than one set in the paragraph.