Copy link to clipboard
Copied
Hi scripters;
There is a hyphenated text frame. Is there a way I can be black and magenta.
thanks..
Copy link to clipboard
Copied
Provisionally: No script needed, a GREP style should be able to do that.
Copy link to clipboard
Copied
Like these:
Copy link to clipboard
Copied
this method does not work correctly
Copy link to clipboard
Copied
Well, we tried.
So, you need to be more specific in your needs. Because looks to work for
me.
Copy link to clipboard
Copied
uniqued_tol wrote
this method does not work correctly
Yes it does. Are you sure you followed the steps correctly?
1. create an 'invisible' character style to hide the hyphens
2. create a 'magenta' character style to color the text
3. apply 'invisible' to the text "-" (without these quotes)
4. apply 'magenta' to the text "(?<=-)\w+(?=-|$)" (again without the quotes)
5. Result:
where the top is your image, bottom is what I get with lf.corullon​'s code. Just in case he was trying to fool you or something (well he wasn't).
Copy link to clipboard
Copied
Thank you any idea!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi;
It is still unsatisfactory for me, the code includes char before and after!
Copy link to clipboard
Copied
Thanks for your comments
The code that Jedi gives is <<perfect>> and <<simple>>.
.+?-\K\w+
"When a grep code is beautiful and works really fine, Grep is truly an awesome feature!" Jedi.