Forum Replies Created
-
AuthorPosts
-
Masood Ahmad
ParticipantPaul, It was a good discussion. I learned a lot today and I’m very happy about it.
You can post as many questions as you want, I/we will be here to sort it out.
Thanks you :)
Masood Ahmad
ParticipantUnfortunately, I can’t see it… :)
Masood Ahmad
ParticipantOkay, when should I come for the treat… :)
so here is the breakup:
/.+?\KCondition one
This will look for a slash, followed by any character, followed by a tab
\Kmeans Keep (same as lookbehind).+?
This is the actual string we are looking for to make it BOLD i.e. any character(?=)Condition two
This will look for a tab just after our actual stringHope that helps :)
Masood Ahmad
ParticipantI’m glad that I could help.
What I have understood is that you want to apply a Bold character style to the place names.
If I’m not wrong, the place name has (day/day and a tab) before and a tab after it. If this is so, then here is the code for you:
Apply Style:
BOLD
To Text:/.+?\K.+?(?=)Please let me know if it is okay :)
Masood Ahmad
ParticipantSomething might be wrong somewhere. I have uploaded the InDesign file for your reference:
https://www.hightail.com/download/bXBieW4ycWY1R05BSXNUQw
Yes, you can perform Find/Change in Styles, only the character style can be applied matching the string.
For your last part, I would suggest to go through https://creativepro.com/resources/grep
Please feel free to post other questions as well. I would be happy to help.Masood Ahmad
Participant@Ron, I tried putting the punctuation marks inside the square brackets but it didn’t worked. Therefore, I tweaked the code to include all of them:
Find:
(^\d)((\<[A-Za-z]+\>[.,?!;:'"]* ){4}).+Masood Ahmad
Participant@Jongware, a very quick research indeed, loved it.
Masood Ahmad
ParticipantThanks Ron, the code does the trick. I knew about \K but never tried it. Today I got an error while testing it in CS5, then I realized that it might work in higher version and it did. Thanks again.
You are right Jongware, I thought, since Lookbehinds are not allowing the repeat so do the Lookaheads will, as they are the two faces of the same coin.
But doesn’t it feel unjustified with the Lookbehinds? Why are they not allowed to feel the same? It might be a bug and could be rectified by Adobe, someday.
Masood Ahmad
ParticipantHi Paul,
I got a better code with the suggestions of Ron for your second query:
2) I am looking to change the character styles of Addition= 1/2 Price bar noon – midnightApply Style:
Price & Additions
To Text:£\d+\K.+
Note: This will work on cs5.5 and later. I test my codes on CS5, where the \K was not working, then I tried in CS6 and it works fine.Hope things are better now.
Masood Ahmad
ParticipantDon’t be Christina. We all make mistakes. This is how we learn. I am used to with such kind of issues. I love troubleshooting. I’m happy that now you have the solution. Take care.
@Mathilde, please advise whether the codes are working fine for you or not.Masood Ahmad
Participant@Christina, my guess was right. There was a problem with the Character Style. The SuperScript character style was having the properties like Font, font size, leading but not the SuperScript value.
https://www.hightail.com/download/bXBieW42Zy9uSlJqQThUQwI have corrected the Character style and renamed it as “SuperScript_Revised”. You can delete and replace the existing Superscript character style with this new one and can rename it accordingly.
The updated InDesign file is at the location given below:
Masood Ahmad
ParticipantSorry paul, I put the code for the n-Dash in the Change to: field.
If you want a hyphen, simply put a hyphen
-or a nonbreaking hyphen~~Masood Ahmad
Participantor you can send it to me directly at masoodahmad@inbox.com
Masood Ahmad
Participant@Christina, really sorry. Is it possible for you to upload a copy of your InDesign file to your dropbox to analyze.
Masood Ahmad
ParticipantTry this:
GREP Find/Change:
Find What:~_
Change to:~= -
AuthorPosts
