Hello,
I need to take a string of mixed Asian characters (for now, assume only Chinese kanji or Japanese kanji/hiragana/katakana) and "Alphanumeric" (i.e., Enlgish, French), and count it in the following way:
1) count each Asian CHARACTER as 1; 2) count each Alphanumeric WORD as 1;
a few examples:
株式会社myCompany = 4 chars + 1 word = 5 total 株式会社マイコ = 7 chars
my only idea so far is to use:
var wordArray=val.split(/\w+/);
and then check each element to see if its contents are alphanumeric (so count as 1) or not (so take the array length). But I don't feel that's really very clever at all and the text being counted might be up to 10,000words, so not very quick.
Ideas?