Pinyin Regex Golf

For the discussion of language mechanics, grammar, vocabulary, trends, and other such linguistic topics, in english and other languages.

Moderators: gmalivuk, Moderators General, Prelates

D-503
Posts: 76
Joined: Sun Apr 15, 2012 11:35 pm UTC

Pinyin Regex Golf

Postby D-503 » Wed Feb 05, 2014 6:35 am UTC

As xkcders many of you are no doubt familiar with regex golf (http://xkcd.com/1313/). As language enthusiasts you may be familiar with pinyin, a system for transcribing Chinese characters into the Latin alphabet. Given that, I though this forum would enjoy this coding challenge I came across while working on a pinyin to zhuyin converter. What is the shortest regex that accepts only strings composed of valid pinyin? Accounting for tone annotations in your regex is optional.

Return to “Language/Linguistics”

Who is online

Users browsing this forum: No registered users and 7 guests