RegEx: How can I modify this expression that separates camel case words to ignore specific words or acronyms? I.E a whitelist

My expression is: ([a-z])([A-Z]\S)

The replacement is: $1 $2

Here is part of my dataset:

HoRNetCompExp_x64
HoRNetDynamicsControl_x64
HoRNetHarmonics_x64
HoRNetHTS9_x64
HoRNetMulticompPlusMK2_x64
HoRNetSongKeyMK3_x64
HoRNetTape_x64
HoRNetValvola_x64

This is what results:

Ho RNet Comp Exp x64
Ho RNet Dynamics Control x64
Ho RNet Harmonics x64
Ho RNet HTS9 x64
Ho RNet Multicomp Plus MK2 x64
Ho RNet Song Key MK3 x64
Ho RNet Tape x64
Ho RNet Valvola x64

What I want to do is incorporate a “whitelist” into my expression so I can account for specific acronyms – I.E. “HoRNet” in the above example. (HoRNet is a VST developer and their brand has odd casing).

So my output should be:

HoRNet Comp Exp x64
HoRNet Dynamics Control x64
HoRNet Harmonics x64
HoRNet HTS9 x64
HoRNet Multicomp Plus MK2 x64
HoRNet Song Key MK3 x64
HoRNet Tape x64
HoRNet Valvola x64

It would be nice to have a format / syntax that would allow me to add multiple words or exceptions.

Any help is greatly appreciated!

Read more here: Source link