After spending a good amount of time researching input validation, I combined a few ideas and came up with this:
Function to check a string for a valid dou
dou
Based on the feedback of those who answered and some of the examples in other questions, I answered my own question. As per FailedDev's suggestion, this question should be marked answered. So here is the accepted answer. :)