I have a vocalized Hebrew text; most letters are followed by one or more combining characters. I would like to replace some of the base characters, leaving the combining characters intact. It seems the only way to search by base character alone is to use \Z
, but when I include that in the search pattern, the combining characters are discarded in the substitution operation. Also searching for the base char followed by a range of combining chars \m\%ufb25[\u05b0-\u05bd]*
doesn't seem to work.
Example
ﬥְמַֽעַן וְהֽוּא־ﬥָֽךְ כְּסֶֽגֶן בְּאֶרְאֶﬥֵּי־אֵשׁ
This text has three occurrences of wide lamed (U+FB25) which I'd like to replace with regular lamed (U+05DC). Each wide lamed is followed by different combining characters:
- <ﬥ> 64293, Hex fb25, Octal 175445 < ְ> 1456, Hex 05b0, Octal 2660
- <ﬥ> 64293, Hex fb25, Octal 175445 < ָ> 1464, ...5b8, Octal 2670 < ֽ> 1469, Hex 05bd, Octal 2675
- <ﬥ> 64293, Hex fb25, Octal 175445 < ֵ> 1461, ...5b5, Octal 2665 < ּ> 1468, Hex 05bc, Octal 2674
The ideal solution would yield the following with a single substitution:
לְמַֽעַן וְהֽוּא־לָֽךְ כְּסֶֽגֶן בְּאֶרְאֶלֵּי־אֵשׁ׃
Note: I avoided formatting as code blocks, because the difference between wide lamed and its regular counterpart isn't apparent when using a monospace font. (Also it isn't really code, in the conventional sense.)