I wanted to change chapter numbers to title case, e.g. TWENTY to Twenty or TWENTY-THREE to Twenty-Three. I came up with these patterns
Find:
Replace:
It works for TWENTY, but it turns TWENTY-THREE to Twenty-three. As an experiment, I put '|'s in the replace string like this:
and I got
, so I can see it is being split correctly, but the T in three is being lowercased. Any explanations why?
Find:
Code:
([\p{Lu}])([\p{Lu}]+)((-)([\p{Lu}])([\p{Lu}]*))?Code:
\1\L\2\4\5\L\6Code:
\1|\L\2|\4|\5|\L\6Code:
T|wenty|-|t|hree








