Regular Expressions 101

Community Patterns

Ateco Code Validation

1

Regular Expression
Python

r"
^([0-9]{2})((?:\.([0-9]{1,2}))?$|((?:\.([0-9]{2}))?\.([0-9]{1,2})))?$
"
gm

Description

Ateco Groups

Regex to identify the groups that make up the ateco code, based on its structure. More details: https://www.istat.it/it/archivio/17888

Valid Ateco: 01 - 28.2 - 24.45 - 46.74.1 - 46.73.22 Not Valid Ateco: 1 - 1.1 - 01.1.1 - 1.01.1

Submitted by christian dalena - 2 months ago