regex - how can I capitalize words in c# .net -


this question has answer here:

i'm trying capitalize words c# applying this

regex.replace(source,"\b.",m=>m.value.toupper()) 

it doesn't work.

i want c#:

"this example string".replace(/\b./g,function(a){ return a.tolocaleuppercase()}); 

output string: "this example string"

the issue need escape search term, involves '\' character. use either @"\b." or "\\b." search term.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -