Grep-Help
Learn / Forums / General InDesign Topics / Grep-Help
- This topic has 9 replies, 6 voices, and was last updated 9 years, 1 month ago by Chris Haynes.
-
AuthorPosts
-
-
January 20, 2015 at 7:53 am #72793algert shtrasseMember
Hi all,
Can you help me with find/change GREP, I need to find out only number with % in this text ?thank you, any help appriciated
Example:
Ectio tem. Itatur simus, 2.3 % mod quisqua tusandi dolo molecum voluptatem aut pratis perum sequibus dolo quaectionse pre nis alignim odignam et etur sequatium re cusam 5.3 % quam fugia sinus evelita tusaped que di naturep udigni cum ulla sequi 100 % im eatur? -
January 20, 2015 at 9:55 am #72796David BlatnerKeymaster
This should work:
[.\d]+? %
(That means find a sequence of one or more digits or dots, followed by a space, followed by a percent symbol.-
February 4, 2015 at 9:48 am #73126Masood AhmadParticipant
David, How did you manage to put your code in a light gray box with a slightly darker border. It is interesting and helpful to put codes separately.
-
February 4, 2015 at 10:07 am #73128David BlatnerKeymaster
I use the html code tags. That is <code> and </code>
-
February 4, 2015 at 10:14 am #73130Masood AhmadParticipant
That’s brilliant. I have noted it down.
Tip of the day! Thanks
-
-
January 20, 2015 at 12:39 pm #72808algert shtrasseMember
Yes, Very helpful
Thank you very much!
-
February 3, 2015 at 10:54 am #73102Elyokim GetzilMember
Hi everyone,
How do I specify “one OR two characters”?
I want to find a paragraph that starts with a specific word, then a space, then just one or two characters, and nothing else.
ie:
Chapter 8
Chapter 22
Chapter eleven…I need the code to find only the first two paragraphs, but not the third one.
Many thanks for your help
-
February 3, 2015 at 11:37 am #73103Aaron TroiaParticipant
For finding “Chapter” followed by one or two numbers only, try:
Chapter\d{1,2}\b
-or-
Chapter [0-9]{1,2}\b-
February 4, 2015 at 8:56 am #73125Elyokim GetzilMember
Many thanks!
-
-
February 14, 2015 at 1:13 pm #73337Chris HaynesMember
My helpful grep style codes:
(?<=m)2
superscript m²[\(“‘].+?[‘”\)](?=[[:punct:]]|\s)
Apply any style to any text inside ( ) or ” ” or ‘ ‘ – included in this code is to ignore the instance of an apostrophe that is not followed by any white space
-
-
AuthorPosts
- You must be logged in to reply to this topic.