Copy link to clipboard
Copied
I am currently using:
\W+|\b(?!(Hello|There)\b)\w+
Which looks like this:
Hello There: You
I tried adding:
\W+|\b(?!(Hello|There|:)\b)\w+
but obviously this didn't work. 😞 haha
I need to amend the grep to include the colon without changing much else about it as it also effects text boxes that don't have colons and are based on other words. Been looking for a while and just not finding a solution. Any help would be appreciated.
Copy link to clipboard
Copied
If you are adding this grep using javaScript, then you need to keep in mind about Escape character.
If JavaScript then this should be added : "\\W+|\\b(?!(Hello|There|:)\\b)\\w+"
If any other way, please elaborate your concern.
Best
Sunil
Copy link to clipboard
Copied
Please give us more example text for your Grep.
What you have - and what you want.
And please write in which way you want to use your Grep.
Grep Find and Replace?
Grep style in paragraph format?
Grep in a script?
Copy link to clipboard
Copied
Of course! It's a paragraph style, linking to a character style.
so I have two instances of text.
1. Hello: there
2. Bye for now
In order to apply the character style to the end of the text I'm using
\W+|\b(?!(Hello|Bye|for)\b)\w+
Which gives me
1. Hello: there
2. Bye for now
But I'd like to include the colon in the "Hello:"
Does that help or do you need more context?
Copy link to clipboard
Copied
What is your rule for that?
A single word followed by colon or the first two words?
Or something different?
Please explain a bit more in detail. And please give a longer example text (before AND after)