Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-05-20 12:46
Flavor·PCRE (Legacy)

/
^([02][1-9]|2[AB]|[1345678][0-9]|9[012345]|97[12346])$
/
Open regex in editor

Description

Cette expression régulière valide une chaîne de caractères représentant un code département selon le code INSEE. Voir http://www.insee.fr/fr/methodes/nomenclatures/cog/

Submitted by anonymous