@sakana 
If you really care about performance, you probably should return false when you meet the first invalid character. The current func will always go through all the characters in the string, which is not very efficient.  
For regex, you can recompiled it in init() and then just do the match, which I think should be very fast.  
And to me, regex is more readable. :)