J'ai cette regex, j'ai construit et testé dans buddy regex.Qu'est-ce qu'un "Quantifier imbriqué" et pourquoi fait-il échouer mon regex?
"_ [ 0-9]{10}+ {1}+[ 0-9]{10}+ {2}+[ 0-9]{6}+ {2}[ 0-9]{2}"
Quand j'utiliser dans .Net C#
Je reçois l'exception
"parsing \"_ [ 0-9]{10}+ +[ 0-9]{10}+ +[ 0-9]{6}+ [ 0-9]{2}\" - Nested quantifier +."
Que signifie cette erreur? Apparemment, .net n'aime pas l'expression.
est ici le copain de regex si u peut comprendre mon intention avec le motif ...
_ [ 0-9]{10}+ {1}+[ 0-9]{10}+ {2}+[ 0-9]{6}+ {2}[ 0-9]{2}
Match the characters "_ " literally «_ »
Match a single character present in the list below «[ 0-9]{10}+»
Exactly 10 times «{10}+»
The character " " « »
A character in the range between "0" and "9" «0-9»
Match the character " " literally « {1}+»
Exactly 1 times «{1}+»
Match a single character present in the list below «[ 0-9]{10}+»
Exactly 10 times «{10}+»
The character " " « »
A character in the range between "0" and "9" «0-9»
Match the character " " literally « {2}+»
Exactly 2 times «{2}+»
Match a single character present in the list below «[ 0-9]{6}+»
Exactly 6 times «{6}+»
The character " " « »
A character in the range between "0" and "9" «0-9»
Match the character " " literally « {2}»
Exactly 2 times «{2}»
Match a single character present in the list below «[ 0-9]{2}»
Exactly 2 times «{2}»
The character " " « »
A character in the range between "0" and "9" «0-9»
En bref ...
Qu'est-ce qu'un Nested quantificateurs?
Dans certaines saveurs regex {min, max} + est un quantificateur possessif, mais .Net ne les supporte pas. Si vous utilisez Regex buddy, vous pouvez lui indiquer la saveur de regex avec laquelle vous travaillez en cliquant droit sur le volet de composition et en sélectionnant votre 'Flavor' dans la liste déroulante. – Grokodile