^[a-zA-Z0-9_.-]+@[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*(\.[a-zA-Z0-9]{2,})*$ Why does this pattern test correctly in Javascript, but not in PHP? Thanks, Iain