i've got a function that matches all letters after a space. I mean;
"this is my string" --> tims
just doing this:
$scope.getLetters = function(str) {
var matches = str.match(/\b(\w)/g);
var acronym = matches.join('');
return acronym;
}
where str of course is the string that i pass from the html. It works pretty well but i would extract max 2 characters. So if the string is
"this is my string"
i would ti only and not the others. How can i do it?