Aide Expression Regulieres
thieg
-
kilian Messages postés 8675 Date d'inscription Statut Modérateur Dernière intervention -
kilian Messages postés 8675 Date d'inscription Statut Modérateur Dernière intervention -
ello Guys,
Trying to analyse my web site stats, I tried to exclude from the
analysis all the URL that contain fr/ or de/
(Exemple: www.mysite.com/fr/home.php or www.mysite.com/de/home.php).
RegExp are not my favorite topic and I couldn't manage to create a
correct expression to exclude such directories.
Any help would be appreciated!
Thanks folks.
Thiegau
Trying to analyse my web site stats, I tried to exclude from the
analysis all the URL that contain fr/ or de/
(Exemple: www.mysite.com/fr/home.php or www.mysite.com/de/home.php).
RegExp are not my favorite topic and I couldn't manage to create a
correct expression to exclude such directories.
Any help would be appreciated!
Thanks folks.
Thiegau
1 réponse
-
Hello,
You can use the function "ereg()" which tests the presence of a RegExp. I think the simple expression "fr" would be a good test. For example, if you take the url "www.mysite.com/fr/home.php":<? $url="http://www.mysite.com/fr/home.php"; if (ereg("fr",$url)) { echo "It's the french language's directory of you server"; } ?>
Bonne chance ;-)Li4uLlZvdHJlIGTpdm916SBzZXJ2aXRldXIuLi4u