I have the following variable in $ scope of Angular JS, with an arrow function:
$scope.cad.nome.toLowerCase().replace(/\b\w/g, l => l.toUpperCase());
I need to format your content, which is someone's full name. It is working until the name has some accent or "Ç". He makes the first few letters of each name capitalized, but when he finds an accent, he makes the next letter stay capital letter as well. example:
MaríLia MendonçA
How do I change the regex so this does not happen?