Add (?s) in front of your search string:
app.findGrepPreferences = '(?s).+';
matches whole stories.
Thanks for your reply pkahrel.
In my document have words: application \nfor you
find what: (application for you)(?s) ------ignore the \n
I don't want entire story.
Please reply me.
find what: "application for you
I am find only words
the line break wherever it is used in the document. so i am ignore the \n
Document text : \napplication \nfor \nyou ----this sentence contain many line breaks
I will find the text of above document text.
Find what of grep preferences: (application for you)(--here what to do for ignore \n)
Please help me.
You're a moving target: you change your question in each post. Do yourself a favour and go and read up on GREP.
I don't think there's a way to ignore line breaks completely, as they are recognized by GREP as white space. But assuming they only occur between words, something like this should work:
That turns on single-line mode and then allows for any white space between words.
Is this a scripting question? I wonder if it shouldn't be moved to the regular InDesign forum.