View Single Post
Old 11-16-2023, 09:18 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,664
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You need to use an \E to terminate an \L or \U otherwise they'll just keep going. So I would suggest an \E immediately after the capture group that represents the '-' in the replace expression (or before it).

\1\L\2\E\4\5\L\6

Or:

\1\L\2\4\E\5\L\6

I'm not at a computer where I can test the replace expression exactly.

I also think you don't need the brackets [] around each individual \p{Lu} instance.

Last edited by DiapDealer; 11-16-2023 at 09:29 PM.
DiapDealer is offline   Reply With Quote