That's not efficient at all though, you can use one regex match to match all the uppercase at the beginning, capture them and the rest, and replace the match with \2 \1.


//echo -a $regsubex( A Z a b y z ,/^((?:\p{Lu}+ )*\p{Lu}+) (.*)/u,\2 \1)

But I'd say OP is looking for the built-in feature, that he already knows how to workaround it.


Last edited by Wims; 13/08/18 06:29 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel