Skip to main content
Participating Frequently
August 13, 2019
Question

GREP expression for bolding and underlining

  • August 13, 2019
  • 1 reply
  • 1551 views

Hi all,

I have documents that need to have specific details bolded and/or underlined.  Is there a way way to have this automatically formatted by GREP or is it too complicated?  Any help would be much appreciated!

Always bolded:

  • #hour(s)
  • #minutes(s)
  • #people/#hour(s)

Always underlined:

  • Day of the week, Month, date
  • Example:

This topic has been closed for replies.

1 reply

jctremblay
Community Expert
Community Expert
August 14, 2019

Absolutely possible...

You can do it quickly using theses queries. But watch for exceptions in your text.

For underligning date:

\u\l+,\h\u\l+\h\d\d?\l\l

For bolding hours and peoples/hours

(\d+\hpeoples?\h/\h)?\d+\hhours?

For bolding minutes

\d+\hminutes

Participating Frequently
August 15, 2019

I tried these, but nothing is happening.  Did I put them in incorrectly or can there be too many GREPs?

jctremblay
Community Expert
Community Expert
August 15, 2019

You can have up to 99 grep style in one styles.

For peoples/hours since you don’t have spaces before after the / you should use this:

(\d+\hpeoples?\h?/\h?)?\d+\hhours?

Why it’s not working? I don’t know. It should.
Stupid question. Does the 1st Bullet style is apply to the text? Does the Underline and Bold (10 pt) are really defined? Easy to verify if you apply them manually.

If it still not work. Send me a snippet of that text.