Oh that's easy, Narayan!
If one's using perl REs, one needs to do a zero-length negative look-behind assertion
to get past an initial upper-cased letter (to avoid putting a space at the start of the string), and then replace any cap with itself preceded by a space. The following:
will turn x2MagicManual
into x2 Magic Manual
. (Of course this will also convert IPonderIBM
into I Ponder I B M
, but you can't have everything you want & maybe it's a good idea.)
Anyway, that's perl 5.005 syntax. Somebody else probably has an alternative expression for doing this... it's the beauty (or horror!) of REs.
(Caveat. I confess that I don't know much about the various implementations of perl in the Windows world, and I know next to nothing about how REs vary from Java to VB & the like, but if one's using a perl-based program, 5.005 is a pretty old & widely used version & I think the above RE syntax would be supported.
You're a brave man, Narayan, to embark on these waters!
Want to try another?