Di you try the standard search and replace options?
You can search for any paragraph style and apply a character style. You can also search for any word(s) and apply a character style to it. No scripting or grep needed.
Hope this helps
well, that will not work for me since the product name appears second time inside a paragraph, not sytle in any special way. If there was a way to select it I would, and assign a paragraph style to it and would be good.
I need a grep that would learn the product name from the line at beginning of the story (where it *is* styled differently) and find (and select) it in a following paragrah of the story, where it is buried in bunch of other text witht he same (body) style.
Grep will not learn from the first line of your story. It will match with pattern what you are giving. I think a script may solve your problem.
"Green Hair Spray^p
made in US^p
voluptat optam Green Hair Spray que solorum blah blah etc on and on "
I assume that "Green Hair Spray" is a product name in this story, and it is styled with a paragraph style "product name" (as you said).
1. Find this parapgraph style and get its content.(use .+ in gerp to avoid paragraph return)
2. And now set this is as your search the content.
3. Find this content and apply some character style as you want.
Good luck... :-)
well, how do I get it to *match with pattern" of the "name of product" paragraph style?
I know how to search for the product-name style, of course, and then I have been copying and searching in rest of copy product-name by product-name. (I got hundreds product names)
you say "1. Find this parapgraph style and get its content.(use .+ in gerp to avoid paragraph return)
is "get its content" in the drop down menu? or what is the script for it?