$regex = '/(Thu Apr 5:.*)Fri Apr 6/'; include everything from the text "Thu Apr 5" and everything after that till we do not want to include "Fri Apr 6" at the end. Décomposition de la regex : [?] /^([^@\s<&>]+)@(?:([-a-z0-9]+)\.)+([a-z]{2,})$/iD Détail : ^([^@\s<&>]+)@ : Au début de la chaîne, tous les caractères qui ne sont pas espace, arobase, <, & et > ; s'ensuit l'arobase (?:([-a-z0-9]+)\.)+ : Les lettres, chiffres et traits d'union ; le tout est suivi d'un point ([a-z]{2,})$ : À partir de deux lettres iD : Insensible à la casse, pas de caractère de fin de ligne en fin de chaîne As I wasted lots of time finding a REAL regex for URLs and resulted in building it on my own, I now have found one, that seems to work for all kinds of urls: Then, the correct way to check against the regex ist as follows: