Copy link to clipboard
Copied
Hey,
So I don't really know anything about GREP apart from a brief explanation left by a previous designer at my work. I need some help with look ahead/behind stuff to make something bold or italics based on tags the writers create to let me know what style they are meant to be.
Basically I have sections of text come in like this:
Six-piece band <b>Neon Waltz<b> hail from (or near enough to) John O'Groats.
I need the text to be formatted like this:
Six-piece band Neon Waltz hail from (or near enough to) John O'Groats.
I can get GREP to change the format of the words to bold using (?<=<b>).+?(?=<b>) and having it change to the bold paragraph style but I am still left with the tags at the beginning and end of the words like this: <b>Neon Waltz<b>
Is there a code to delete the <b> tags at the same time as doing the style change.
I have similar codes with <i>words<i> for italics and <b><i>words<i><b> for bold italics but I can hopefully figure them out once I've got the bold fixed.
We had previous GREP searched saved onto my InDesign but since upgrading to 2017 I have lost all my previous settings and been trying to get them back slowly.
1/
Find: <b><i>(.+?)<b><i>
Replace by: $1 + "Bold-Italic" char style
2/
Find: <b>(.+?)<b>
Replace by: $1 + "Bold" char style
3/
Find: <i>(.+?)<i>
Replace by: $1 + "Italic" char style
(^/)
Copy link to clipboard
Copied
1/
Find: <b><i>(.+?)<b><i>
Replace by: $1 + "Bold-Italic" char style
2/
Find: <b>(.+?)<b>
Replace by: $1 + "Bold" char style
3/
Find: <i>(.+?)<i>
Replace by: $1 + "Italic" char style
(^/)
Copy link to clipboard
Copied
thank you so much!
Copy link to clipboard
Copied
If you had the GREP queries saved in an old version, you can move or copy them to the new version. Go to the GREP folder in the Find-Change Queries folder.
On a Mac: Users/[yourname]/Library/Preferences/Adobe InDesign/Version x.0/en_US
On a PC: C:\Users\[yourname]\AppData\Roaming\Adobe\InDesign\Version x.0\en_US
Copy the .xml file to the same location in the new version. Or just move them.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now