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:
Code:
([\p{Lu}])([\p{Lu}]+)((-)([\p{Lu}])([\p{Lu}]*))?
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?