Skip to main content
Participant
April 13, 2020
Answered

How can I ignore an uppercase character in my GREP command?

  • April 13, 2020
  • 2 replies
  • 731 views

Hello! I am creating a recipe book, and have written a GREP command that applies a character style to the numerals (measurements) in my ingredients list. The command is:

 

^.+?\u

 

This command is intended to include everything in the paragraph up until the first uppercase character (but not including the first uppercase character). This expression, however, is applying the style to the first uppercase character. How can I change the expression so that it omits that first uppercase character? Thanks so much!

This topic has been closed for replies.
Correct answer pixxxelschubser

Hi @_Jongware_,

then this

^\U+

should do the same job - right?

😉

 

2 replies

pixxxelschubser
Community Expert
Community Expert
April 13, 2020

@angelar32026048,

glad we could help.

 

By the way, you know that you can marks more than one answer as correct answer?

@_Jongware_'s is also correct, it's only an other kind of spelling.

😉

Jongware
Community Expert
Community Expert
April 13, 2020

Easiest is everything not an uppercase:

 

^[^\u]+

Then you don't need the "?" either.

pixxxelschubser
Community Expert
pixxxelschubserCommunity ExpertCorrect answer
Community Expert
April 13, 2020

Hi @_Jongware_,

then this

^\U+

should do the same job - right?

😉