Highlighted

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

New Here ,
Apr 13, 2020

Copy link to clipboard

Copied

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!

Most Valuable Participant
Correct answer by pixxxelschubser | Most Valuable Participant

Hi @_Jongware_,

then this

^\U+

should do the same job - right?

😉

 

TOPICS
EPUB, How to, Type

Views

348

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

New Here ,
Apr 13, 2020

Copy link to clipboard

Copied

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!

Most Valuable Participant
Correct answer by pixxxelschubser | Most Valuable Participant

Hi @_Jongware_,

then this

^\U+

should do the same job - right?

😉

 

TOPICS
EPUB, How to, Type

Views

349

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 13, 2020 0
Most Valuable Participant ,
Apr 13, 2020

Copy link to clipboard

Copied

Easiest is everything not an uppercase:

 

^[^\u]+

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2020 2
Most Valuable Participant ,
Apr 13, 2020

Copy link to clipboard

Copied

Hi @_Jongware_,

then this

^\U+

should do the same job - right?

😉

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2020 2
Most Valuable Participant ,
Apr 13, 2020

Copy link to clipboard

Copied

@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.

😉

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 13, 2020 0