^ - at the start of the line [\w.-]+ - match one or more word characters, periods or hyphens \@ - followed by an @ (?:[\w-]+\.)+ - then a series of either one or more word characters/hyphens or a period \w+ - followed by one or more word characters $ - then the end of line.