c# - Regex match for starting character or _\w -


i want replace start character or _\w uppercase. here code

cmbserviceoffering.items.add(regex.replace(so.tostring().tolower(), "($\\w|_\\w)",                  new matchevaluator(                       m => m.groups[1].value.toupper()                    ))); 

but not match start character. suggestion ?

the modifier of start of regex ^ not $. $ end of regex modifier.

you need change regex following

"(^\\w|_\\w)" 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -