Thursday, December 13, 2012

Add Space Before Capital Letter

In one of my recent project my requirement was to add a space before a capital letter like, if our word is "HiAmbika" then we have to convert it to "Hi Ambika".

Example: 
Input String: "RajaRamMohamRoy"
Output       :  "Raja Ram Mohan Roy"

I just used regular expression in ColdFusion to achieve this as follows.


We can also do other advance string matching functionality with back referencing. We will see that latter.


2 comments:

Followers