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

grep with multiple requests

Participant ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

imagine this pattern:
15. October
16. November
17. December

always a two-digit number... a period, space, and a word (month)

how do I find recurrences with grep? I'd like to take advantage of the grep styles.

Individually I can, but how do you say "in addition to the number also find me a point and then a space and then a text"?

I don't understand how to add requests... if I put them below it doesn't work

TOPICS
How to , Scripting

Views

595

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 , Aug 14, 2020 Aug 14, 2020

How about the following

\d{2}.\s\w+

-Manan

Votes

Translate

Translate
Participant ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

/d/d./s(January, |February, |March, |April, |May, |Juni, |July)

... is right?

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 ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

Try this 

\d\d\.\s(January|February|March|April|May|June|July|August|September|October|November|December)

Bit didn't you get a few days ago an answer for this question?

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
Participant ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

yes I just added the comma and the space to my "big problem". What I found on the grep does not apply literally in indesign. Where can I find examples? They're not that clear on the manual... for example they talk about multi-straight and do not explain the concrete result of this. I found a test for the online grep, but it's not exactly the indesign grep, because it has variations in the syntax. Although the tool is powerful I do not find it very intuitive. For now, I would need examples. If I found a list of examples it would be easier for me.

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 ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

Just google “InDesign grep” and you will find a looooot of resources!

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 ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

If you have a GREP expression and you want to see how ot works, try my WhatTheGrep script: http://www.jongware.com/idgrephelp.html

 

There are some complicated expressions that befuddle it but for basic expressions it works flawless. It can also point out possible mistakes.

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 ,
Aug 14, 2020 Aug 14, 2020

Copy link to clipboard

Copied

How about the following

\d{2}.\s\w+

-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
Participant ,
Aug 21, 2020 Aug 21, 2020

Copy link to clipboard

Copied

LATEST

beautiful this last intervention and very synthetic - I loved it, but this research also finds the texts "21, 1" while modified so it works: \d{1,}\. \w+

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