M
Marek Mand
<script>
var newval = '';
var name = 'marek mänd-österreich a';
// http://www.faqts.com/knowledge_base/view.phtml/aid/15940
correctedname = name.replace(/\b\w+b/g, function(word) {
return word.substring(0,1).toUpperCase()
+ word.substring(1);
});
alert(correctedname);
</script>
How would I get "intended output" out from it taht is:
"Marek Mänd-Österreich A"
Mozilla works as intended and desired, the MSIE fails totally.
So what is the "word boundary" regex for other languages than English?
I thing Javascript regular expressions are weak and unusable.
var newval = '';
var name = 'marek mänd-österreich a';
// http://www.faqts.com/knowledge_base/view.phtml/aid/15940
correctedname = name.replace(/\b\w+b/g, function(word) {
return word.substring(0,1).toUpperCase()
+ word.substring(1);
});
alert(correctedname);
</script>
How would I get "intended output" out from it taht is:
"Marek Mänd-Österreich A"
Mozilla works as intended and desired, the MSIE fails totally.
So what is the "word boundary" regex for other languages than English?
I thing Javascript regular expressions are weak and unusable.