Quelle Regex ?

WRInaute passionné
Bonjour,

quelle est la regex qui correspond à toutes les lettres de a à z ([a-z]+), des chiffres ([0-9]+), et les caractères underscore et tiret ?

Merci d'avance :)
 
WRInaute occasionnel
\w

any "word" character
\W

any "non-word" character

Each pair of escape sequences partitions the complete set of characters into two disjoint sets. Any given character matches one, and only one, of each pair.

A "word" character is any letter or digit or the underscore character, that is, any character which can be part of a Perl "word". The definition of letters and digits is controlled by PCRE's character tables, and may vary if locale-specific matching is taking place. For example, in the "fr" (French) locale, some character codes greater than 128 are used for accented letters, and these are matched by \w.


tiré de : http://fr2.php.net/manual/en/reference. ... syntax.php
 

➡️ Offre MyRankingMetrics ⬅️

pré-audit SEO gratuit avec RM Tech (+ avis d'expert)
coaching offert aux clients (avec Olivier Duffez ou Fabien Faceries)

Voir les détails ici

coaching SEO
Discussions similaires
Haut