Whoa, man, that's a regex and yours is actually different than what is written here. Also what's written here is pretty clear in functionality and intent. No complex regexes needed. I like it like this.