<script> var len = "\\\321 cfit 12. same word and sdfsdf 1.".match(/(\d{3})/g); alert((len ? len.length : 0) + ':( '); </script>