Quantcast
Channel: Adobe Community : Discussion List - InDesign
Viewing all articles
Browse latest Browse all 65617

Using GREP to style text - help!

$
0
0

I'm trying to learn GREP to style text... and banging my head off a brick wall!

 

The text is:

Subject | Institution | Date

Lorem ipsum dolor...

 

I want to format the text before the first vertical line (|) as bold, the text between the first and second vertical lines as italic, and a third style for the text between the second vertical line and the carriage return. The remaining text (Lorem...) will be the regular paragraph style. Seems pretty straightforward....

 

I'm comfortable with setting up the relevant character styles for the formatting I require, I just can't work out how to select the relevant text. I can't even figure out how to express 'select text before' a particular caharcter like '|'!

 

Can anyone help me write the GREP expression, or point me in the direction of some examples that contain similar expressions? I've found some cheatsheets online (below), but none contain the 'select text before' expression.

 

http://www.night-ray.com/regex.pdf

http://www.ericagamet.com/wp-content/uploads/2011/11/Erica-Gamets-GREP -Cheat-Sheet.pdf


Viewing all articles
Browse latest Browse all 65617

Trending Articles



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