• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

GREP query

Engaged ,
Jan 18, 2022 Jan 18, 2022

Copy link to clipboard

Copied

Hi folks. I have what I imagine is a very simple GREP query. All of the products in my catalogue have a 'Delivered to you from ...' date which appears at the end of the text. I'd like it to appear in the bold character style but the text after that varies according to the date, so I'd just like it to continue until it gets to the full-stop ideally (or end of paragraph). When I use 'end of paragraph' within the GREP option after the text it cancels out all of the bold text.

Bonus points if you can help me make the 'grows to ...' text a different style (this appears immediately before the delivery date. 🙂

Thank you very much.

 

Screenshot 2022-01-18 at 10.02.28.png

TOPICS
How to , Type

Views

3.0K

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
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 20, 2022 Jan 20, 2022

I solved the problem by dragging the “italic body” character style at the top of the GREP style list. I am not sure why it works now…

Capture d’écran 2022-01-20 à 14.19.04.jpg

Capture d’écran 2022-01-20 à 14.20.21.jpg

Votes

Translate

Translate
Community Expert ,
Jan 18, 2022 Jan 18, 2022

Copy link to clipboard

Copied

Try if the following works for you

Delivered to you from .*[.\r]

And for Grows to do we need to find it anywhere or just before Delivered to? And also is the search to be terminated at a full stop for this?

-Manan 

Votes

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
community guidelines
Engaged ,
Jan 18, 2022 Jan 18, 2022

Copy link to clipboard

Copied

Thank you... 'Grows to...' will always preceed 'Delivered to you from...' as per the example and yes the two are separated by a full stop. Thanks.

Votes

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
community guidelines
Community Expert ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

Try the following

(grows to .*?)\.\s*(?=Delivered to you from)

-Manan

Votes

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
community guidelines
Engaged ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

Hmm... this one doesn't work. Note there is not always a 'delivered from' line after the growing size. Sometimes 'Grows to ...' is the last sentence, but it will always be structured the same - 'Grows to (variable).'

Votes

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
community guidelines
Community Expert ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

Ahh, so in the previous post you mentioned that it will always preceed delivered from so my expression does need delivered from to be present. Try the one shared by @jmlevy that should work.

-Manan

Votes

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
community guidelines
Engaged ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

I got it to change to a particular character style (italics), but the following character style also appears in italics even though it shouldn't. Here's what I'm trying to get:

Grows to xxcm. Delivered to you from xx.

Here's what I'm getting, even though the second character style is not set to be italicised:

Grows to xxcm. Delivered to you from xx.

Votes

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
community guidelines
Community Expert ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

This works for me:

Capture d’écran 2022-01-19 à 18.20.31.jpg

Votes

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
community guidelines
Engaged ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

Thanks... still not working quite right for me. If you see my example 'Grows to' is a different style to 'Delivered to you from'. I can get them both to work but 'Delivered to' is appearing in bold italics, like it's continuing the italics from the 'Grows to', even though the style doesn't say italics.

Votes

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
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

Just to be sure to understand: you want to have “Grows to xxx.” in italics, including the period, right? 

Can you post screenshots of your query? And a screenshot of your text, showing hidden characters?

Votes

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
community guidelines
Engaged ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

No problem - here are three screenshots. My character style for the bold text showing no skew; an example of how the 'Delivered to you from' text is showing italics (it shouldn't) and my GREP settings. Thanks!

 

 

Votes

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
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

I am not an expert enough to understand why you use .*[.\r]

 

But the querys I use work, see below.

Capture d’écran 2022-01-20 à 10.52.41.jpg

Votes

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
community guidelines
Engaged ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

Hmm I have copied your suggestion but still have the problem. Maybe it is because I am using skew as the font doesn't have an italic variant. My bold style is set to 0% skew and italic style to 10%.

Votes

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
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

Can you share a sample of your file?

Votes

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
community guidelines
Engaged ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

Here you go, that text contains a paragraph style with the GREP and the two character styles. Many thanks.

Votes

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
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

I solved the problem by dragging the “italic body” character style at the top of the GREP style list. I am not sure why it works now…

Capture d’écran 2022-01-20 à 14.19.04.jpg

Capture d’écran 2022-01-20 à 14.20.21.jpg

Votes

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
community guidelines
Engaged ,
Jan 20, 2022 Jan 20, 2022

Copy link to clipboard

Copied

LATEST

Magic - thank you! Yes I guess it's some kind of hierachy thing. I figured it didn't matter whereabouts in the text the expression appeared but it obviously does. Thanks again.

Votes

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
community guidelines