akilesh raj
akilesh raj

Reputation: 674

Sublime Regex convert character after underscore to uppercase and then remove underscore

I have the following code,

"doctype": "Item_attribute_value_customer_name"

I want to be able to convert this into

"doctype": "Item Attribute Value Customer Name"

Essentially, the character after the underscore should be converted to uppercase and the underscores have to replaced by space.

Can someone please help me with the code to achieve this is Sublime.

Upvotes: 3

Views: 1148

Answers (1)

vks
vks

Reputation: 67978

_([a-z])

You can find this and replace by \U$1 or \U\1.See demo.

https://regex101.com/r/sS2dM8/33

Upvotes: 4

Related Questions