$re = '/(\d{2}\/\d{2}\/\d{2,4}|\d{2}\/\d{2,4}|20\d{2}|\d{1,2} mois|\d{1,2} .{1,9} \d{2,4})/m';
$str = 'R1 = ([ée]ch[ée]ance|exp[eé]ritation|fin|terme) du bail
R1_bis = (\\d{2}\\/\\d{2}\\/\\d{2,4}|\\d{2}\\/\\d{2,4}|20\\d{2}|\\d{1,2} mois|\\d{1,2} \\w{1,9] \\d{2,4})
\\d{1,2} .{1,9} \\d{2,4}
echéance du bail 3/6/9 30/09/20
échéance du bail 06/2025
expéritation du bail 06/2025
terme du bail 31 août 2028
terme du bail 31 novembre 2028
fin du bail en 2027. desti
fin du bail 2021 environne
fin du bail en 2028 enviro
fin du bail dans 2 mois
fin du bail 2021 activités
(fin du bail 18 mois)
fin du bail le 13/04/2025
(\\d{2}\\\\d{2}\\\\d{2,4}
\\d{2} mois
\\d{1,2} \\w{1,9] \\d{2,4}
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php