Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92756

Re: Re: Script to find word stacks in InDesign

$
0
0

Hi sandy8000,

 

for your question

Three or more of the same word or characters stacked at the beginning or ending of lines.

this should works for you (use a character style with a different color):

//FindChangeDoublesAtBeginAndEnd.jsx
app.findGrepPreferences = app.changeGrepPreferences = null;

app.findGrepPreferences.findWhat = '^(\\w+ )\\1+\\b';
app.changeGrepPreferences.changeTo = '';
app.changeGrepPreferences.appliedCharacterStyle = 'Your predefined character style';
app.changeGrep();

app.findGrepPreferences.findWhat = '( \\w+)\\1+\\b(?=[[:punct:]]?$)';
app.changeGrepPreferences.changeTo = '';
app.changeGrepPreferences.appliedCharacterStyle = 'Your predefined character style';
app.changeGrep();

app.findGrepPreferences = app.changeGrepPreferences = null;



 

Grep_FindStack_CS_5_5_script.png

 

Have fun

 

 

If not, give us a text example, please.


Viewing all articles
Browse latest Browse all 92756

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>