Documentation Center

Word and number definitions

A WorldServer word is defined as an array of letter (L) and middle-word (W) characters starting and ending with a letter. Using regular expression syntax, a word is defined as: L[LW]*L.

A WorldServer number is defined as an array of digits (D) and middle-number (N) characters starting and ending with a digit. Using regular expression syntax, a number is defined as: D[DN]*D.

The following table illustrates WorldServer word breaking algorithm.

I have a hat.4 words
I’ve learned word-breaking.3 words
He is 5-6 feet tall.4 words and 2 numbers
Please send $10.27 and ¥10,000 to foo@bar.com.5 words and 2 numbers