I'll be curious to see perf diff between strpos+explode and preg_match (while your solution is much more elegant).