I am trying to flip every hebrew set of characters inside a string. Lets say I have this string(Instead of hebrew letters, I will be using symbols):
§♀♠♪ this is my message♣♠♦►♣
(You can probably tell which character is in which language).
And I want this character set - §♀♠♪
to be replaced with ♪♠♀§
.
But, I want message♣♠♦►♣
to be replaced with message♣►♦♠♣
, so only the english word inside this will stay unreversed.
How can I do that? (Yes, I know I cant use these symbols in a regular string but this is an example.)