I'm translating an American guidebook to Danish in InDesign CS6. I need to change all store/event hours from 12 hour clock to 24 hour clock. From "h9am-4pm" to "kl. 9-16".
Obviously I need to change it for all possible variations of store hours, not just the 9am-4pm.
I'm new to InDesign and GREP, so I'm looking for some help on how to automate the change. It's A LOT of store hours
GREP cannot do calculations, all it can do is find the hours with some confidence. To search for a time, try this: \d+[ap]m-\d+[ap]m
You can lob off the "am" part with a single replace:
-- replace with nothing. For the other 12 hours, you either need to do 12 replacements or use a script.