GREP position marker "^" = Beginning of Paragraph (not beginning of a new line after a forced line break)
Dear Support,
with the GREP position marker "^" for "Beginning of Paragraph", the GREP-search should consider the position of the beginning of a paragraph.
But this marker does not only recognize the beginning of a paragraph, but also the beginning of a new line after a forced line break (SHIFT-RETURN).
This is not correct: A forced new line is not the beginning of a paragraph.
The only correct way would be to consider the beginning of a paragraph (RETURN).
Sometimes you can use "(?=\r)\w+" to look for a word behind a Return instead of "^\w+" to find only the hits at the beginning of a paragraph. However, a combination with the search for a paragraph format can be disturbing here: with the lookbehind combined with a paragraph style only those places are found, where two consecutive paragraphs have the same paragraph style.
Please correct the effect of ^ to only beginning of paragraph (and not forced line break).
Thanks for reporting the issue. We will review it shortly
-InDesign Team
-
CS5 omachi commented
Please check this issue as well.
https://indesign.uservoice.com/forums/601180-adobe-indesign-bugs/suggestions/39385438-serious-problem-of-for-grep-search -
Hans-Jürgen Dyhr commented
A detailed description / discussion (unfortunately in German) about this behavior can be found here:
https://www.hilfdirselbst.ch/foren/Absatzbeginn_mit_GREP_finden_P577077.html?sb=post_latest_reply;so=ASC;forum_view=forum_view_collapsed;;page=unread#unread -
Martin Fischer commented
Hm.
After some thinking about:
Maybe "beginning of a paragraph" is the wrong term for the position mark ^.
Maybe ^ should better be called the "beginning of a new line" after a newline character (RETURN and/or SHIFT-RETURN).I have been pointed to an expression to find the position of the beginning of a new paragraph:
(?<!\n)^.
= the beginning of a new line but without a forced line feed \n before.So the expression to find the position of the end of a paragraph reads:
.$(?!\n)
= end of a line at the end of the story or with a break character but without a forced line feed \n after it. -
Martin Fischer commented
P.S.: This behavior has persisted in all versions since the release of InDesign CS3.