is there a elegant way to parse a word and add spaces before capital letters

后端 未结 7 741
遥遥无期
遥遥无期 2020-12-01 09:43

i need to parse some data and i want to convert

AutomaticTrackingSystem

to

Automatic Tracking System

esse

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 09:57

    If you seek to keep acronyms intact, replace "([^A-Z])([A-Z])" with "\1 \2", else replace "(.)([A-Z])" with "\1 \2".

提交回复
热议问题