Dear Oscar,
Based upon your sample text, I have tried to write some GREP Find/Change codes, that will help you to automate your task upto some extent. Since I’m not a script writer, I hope someone or David might help you accumulate all the below ten Find/Change GREP queries into one “FindChangeList” Apple or Java script, built-in in InDesign.
Here are my codes with no formatting. Just run each step by step, you can also use your Paragraph/character style in the “Change Format” options box.
01_Remove codes.xml
Find What:
^.+(?=(Number|Chartrad|Charterpresident|Address|Meeting time|Phone|Email|Webpage|Title))
Change to:
blank (to remove the unwanted stuff)
02_Change NumberClub.xml
Find What:
^(?i)(Number)#(Club)(?-i)
Change to:
$2$1
03_Change Chartrad.xml
Find What:
^(Chartrad)#(.+)
Change to:
$1$2
04_Change Charterpresident.xml
Find What:
^(Charterpresident)#(.+)
Change to:
$1$2
05_Change Address.xml
Find What:
^(Address)#(\w+)( \w+)?#(\w+)###(\w+)#(\w+)
Change to:
$1$2$3,$4,$5 $6
06_Change Meeting time.xml
Find What:
^(Meeting time)#(.+)#(.+)
Change to:
$1$2 $3
07_Change Phone.xml
Find What:
^(Phone)#(.+)#(.+)
Change to:
$1$2-$3
08_Change Email.xml
Find What:
^(Email)#(.+)
Change to:
$1$2
09_Change Webpage.xml
Find What:
^(Webpage)#(.+)
Change to:
$1$2
10_Change Titles.xml
Find What:
^(Title)#(\w+)#(\w+)#(\w+)#(\w+)#(\w+)
Change to:
$1$2 $3$4-$5, $6
Just try these step by step and let me know it these helps. You can also download these GREP queries from the link given below:
https://www.hightail.com/download/elNJbGtBUzhkMnNVV01UQw
and save them under the Find-Change Queries/GREP folder.
I’m on MAC and my location is:
//Users/username/Library/Preferences/Adobe%20InDesign/Version%207.0/en_GB/Find-Change%20Queries/GREP/
…waiting