Anyone here know GREP? [Solved}

\$\$(.*)the
finds “$$” “any text” up to and including the last occurrence of “the” in a paragraph.

How can I find same but only up to the FIRST occurend of “the”?

Thanks.

Update: Solved… found the answer. thanks.

Could you let us know what it was? Really interested.

Answer to my example: /$/$(.*)the?
Use of the “?” (question mark) quantifier is needed. It basically limits any find to the first occurance of a find and not the last. By default a “Grep” search will find the “widest” possible match. The Question Mark quantifier limits to the first match.

BBedit’s Grep help
https://anybrowser.org/bbedit/grep.html

1 Like