ail-framework
ail-framework copied to clipboard
Phone.py regex var define twice
In Phone.py line 26-27, var reg_phone is defined twice
# regex to find phone numbers, may raise many false positives (shalt thou seek optimization, upgrading is required)
reg_phone = re.compile(r'(\+\d{1,4}(\(\d\))?\d?|0\d?)(\d{6,8}|([-/\. ]{1}\d{2,3}){3,4})')
reg_phone = re.compile(r'(\+\d{1,4}(\(\d\))?\d?|0\d?)(\d{6,8}|([-/\. ]{1}\(?\d{2,4}\)?){3,4})')
2nd assignment is applied but what about the first one ? line should be deleted ?
An improve could be to use the phonenumbers lib which is a port of the Google's common Java libphonenumbers