October 25th, 2012, 11:03 PM
For a string of the formats: abc_def_ghl or abcd_xyz, abc_def_ghl_k, etc
I like to replace the "_char" with the uppercased char, for example:
abc_def_ghl --> abcDefGhl
abcd_xyz --> abcdXyz
abc_def_ghl_k --> abcDefGhlK
What is the RegExp for it?
October 26th, 2012, 08:22 AM
Moving to the Regular Expression forums.
October 26th, 2012, 08:38 AM
well, the regex will be very simple. If you only have letters from a to z, it's
with the letter being in the first matching group (hence the parentheses).
Replacing the string with the uppercase letter is up to the application (whatever language you're using).
Comments on this post