Copy link to clipboard
Copied
I have an InDesign file with headers of bank names in Chinese.
The problem is that the Chinese characters need to be reversed.
Is there a way to create a GREP expression to search for word(s) of any length, and then reverse the entire string of characters? I will be restricting the search to a given paragraph style that has only been applied to the bank names.
For example, if the string in question is ABCD, the desired result is DCBA.
Copy link to clipboard
Copied
… Supposing the Starting point is "ABCD" (in capitals) and the Arrival point is "DCBA"!
3 simple Regex!
In my sample, the biggest word is "EFGHIJKLMN" that has 10 chars. So you will need to play:
Regex "_Fridnge_1" once
Regex "_Fridnge_2" 10 times (until no match!)
Regex "_Fridnge_3" once
Of course, with a tool as Multi-Find/Change, you just need 1 click!
(^/) The Jedi
Copy link to clipboard
Copied
The Jedi's solution is slick, as usual, but I fear it won't work in your case, as that solution is built around searching for \u, meaning A Single Uppercase Letter, and that won't capture any Chinese characters. I suppose one could replace each instance of \u with something like [\x{2E80}-\x{9FBB}] which should capture most Chinese characters. (There are exceptions, like for full-width punctuation. If you wind up using a solution like this, there are easy ways to test to find out if all of your glyphs are being caught by the Unicode-value regex I provided above, like applying a highlight character style to visually review, which can be deleted from the document once you've done your QA.)
But, if you don't mind my asking... why? Why are bank names mirror-reversed in your document? I'd suspect that maybe they've accidentally have some right-to-left text setting applied, which could just be turned off. That'd be less risky than trying to reverse glyph order.
Copy link to clipboard
Copied
Hi Joel,
My starting point (without more info) was F/R based on Capitals but it could be any char including its font style!
(just replacing "\u" by ".")
Here, I've used the "Adobe Myungjo Std" font:
(^/)