bonjours, je vous montre le string a chercher a l'aide d'une regex :
<a href="http://blalba.com/repertoire/toto-est-bete.php5" mce_href="repertoire/toto-est-bete.php5">Booking at your tata<br></a>
le regex que j'ai ecrit au debut etait :
1 2 3 4
| $pattern2 = '<a *href="(.*) *mce_href="(.*) *">.*<\/a>';
if (preg_match_all($pattern2, $match, $tabLiens) ) {
...
} |
seulement, ca me note une erreure :
Warning: preg_match_all() [function.preg-match-all]: Unknown modifier '.' in /www/skiset/www/backOffice/traduction/pagesstatiques.php5 on line 159
j'ai donc essayé :
$pattern2 = '/<a *href="(.*) *mce_href="(.*) *">.*<\/a>/s';
j'ai plus l'erreure mais, ce ne em trouve pas le string,
cette solution ne marche pas non plus :
$pattern2 = '/<a *mce_href="([[:alnum:][:punct:][:graph:]]*)" *href="([[:alnum:][:punct:][:graph:]]*)" *>[[:alnum:]<>,:;]*<\/a>/s';
ca ne marche pas non plus...
Partager