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

Grep style help please: (two (or) more) parentheses...

Community Beginner ,
Jan 05, 2022 Jan 05, 2022

Copy link to clipboard

Copied

Hello friends,
I have a few thousand pages and need some "Grep Styles" to save lives. Actually I was able to come up with two solutions for title and numbers. (after searching the internet for nights ;)).


1. ^\d+?[-]\s.+?\r
2. ^\d+?[)]|\d+?[-]\d+?[)]

 

But I couldn't find a solution for multiple parentheses. Unfortunately, this code does not apply to all.  \(.+?\)
How can I style everything between two parentheses? (multiple parentheses, quotes etc.)
I also share the screenshot if needed.
Thank you very much in advance for your valuable help.


iMac 2020 Monterey
InDesign 17.0.1

 

 

Sample Text:

 

1- Xerum harum

con cum enihiciatur senimi,

 

1) tet alitatem. Ut fuga. Rere(in)’tt enihici minvente (nimpel in consequo te) ma cullaut volupturit elicips untintiam quunt (et offic(ab) oreribus) atur,

2-4) ut prerspitis dere nonsectorpor (molore (ne)) niminus earupta (dolup(t)’a “musaper”) ionsectaeste pellore cumque reiusti bera natur,

* Et omniet alici odion (re) con nonsed magnia cusam excessu ndusapictur, nime volor archicatiam sum doles alignat ionsectore maxim sunt (quam (aut) volum(qu)’a lit (“que”)) volorem re ipid “quatem(po)rem” que consequid ut eos (everovi (tatur)), alit autem ist, ilignim agnihilibea ium voluptasit. (3)

5-10) ium autem doluptatquo blabo.

125-250) Ant pro blabor magnatat. (5)

 

 

2- In placcul

lacerep ratios ventis qui iumquatur re,

 

1) core erem restota temquae ctotate mperumq uatur,

25-30) quidelles vellorum nati “aribeaquid (eatiat)’em (ligni(ma)) quae (rest), inis” rem “(expe(ru)’m)” qui nihita verat verum eiunte nemolorerro ommolo cumentur, consed eos doloris veribus, quo blabore comnima gnatenis magnimus comnimp orecest eos ut quibus ut aut odis exerchitem quaecum expliqu atintiut. (115)

150-250) In none dolorumeniam res re, autet, si dolor alition sequam sunt labor adisquidel exceatet in rectet ernatia cum (anto(ta)’m), adis in perunt (eum volorei(um) harchil) eveliatur min rehent volo tempernam rescilit verio. Nam et optat harchil loratem dolorenda. (250)

* Et omniet alici odion re con nonsed magnia cusam excessu ndusapictur, nime volor archicatiam sum doles alignat ionsectore maxim sunt quam aut volum quae lit que volorem re ipid quatemporem que consequid ut eos everovi tatur, alit autem ist, (ilignim “agnihili(be)’a ium voluptasit”, inienis (maxim(et)) evendel). (10)

* libusdant ut ad ut occum nempos ut harit et ut iditiatur aut aciae coresene eum fugia doluptat as audam im qui officiendis eum si ratibus, inum (fugit), sita dolupta conese commo eum nist accusap erestio venisto et fugitecum res incienia dolorem et dolut mi, (volut endipsam rehenit quisque).

300-500) Ria asitibea aut latata erum vollorepudae poreped qui sa quam eatur, ata vendio voluptatiis ut ex explaboresto (corum(qu) iberion) excesci (consect otatur (sus), “occupta” ventia ipsa(pit)’a dolo) occust.

 

 

3- conet acestotaqui

raest dolorep ereperum quas

 

1) velestem dollant etur simoluptatus rempos perspelic tem fugiatur sumquam, sequae volesendemo moluptatem et harchitam as et alicilibus,

...

TOPICS
Feature request , How to , Scripting

Views

265

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 06, 2022 Jan 06, 2022

Hi,

 

I think you can use this

 

\((?:[^)(]+|(?R))*+\)

 

 

Votes

Translate

Translate
Community Expert ,
Jan 06, 2022 Jan 06, 2022

Copy link to clipboard

Copied

Hi,

 

I think you can use this

 

\((?:[^)(]+|(?R))*+\)

 

 

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 Beginner ,
Jan 06, 2022 Jan 06, 2022

Copy link to clipboard

Copied

Wow, thanks a lot, you solved my thousands of pages problem with just a tiny bit of code, thank you so much.

Now I can sleep well at night.. 😉

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 10, 2022 Jan 10, 2022

Copy link to clipboard

Copied

LATEST

Hi,

 

Happy to help 😄

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