I'm trying to GREP-match words on a line starting with a specific word:
Contact Person Walter Einstein
Company ACME Corp
Website acme.com
Here, I would want to match the first words before the tab after the line starting with Contact Person
.
I need this to automatically apply a character style which applies a greater leading to insert some space between the Company Person line and the next one, which doesn't always read 'Company'.
In the paragraph style, I made a GREP Style to apply my Char. Style but it doesn't work yet.
It's something like this:
(?m)(?<=Contact\sPerson\t)(?:.*~b)(^.*$)`
So this should be a positive lookbehind to match "Contact Person" and the following tab (?<=Contact\sPerson\t)
, then an ignored group till the end of the line (?:.*~b)
, and then a match for the whole next line (^.*$)
.
I also experimented with (?s) Single line mode but couldn't manage to do this.