Changes

Jump to navigation Jump to search
94 bytes added ,  09:38, 24 April 2019
m
Line 10: Line 10:  
                         r'[1-9][0-9]|'
 
                         r'[1-9][0-9]|'
 
                         r'[1-9])'
 
                         r'[1-9])'
                         r'\b')</source>
+
                         r'\b')
 +
port_regex = r'([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'</source>
 
===IP===
 
===IP===
 
<source lang="python">ip = re.compile('^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$')</source>
 
<source lang="python">ip = re.compile('^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$')</source>
Line 43: Line 44:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
=== Phone Number ===
+
===Phone Number===
 
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
 
sep = '(:?\s+|-|\.)?' # separator
 
sep = '(:?\s+|-|\.)?' # separator
Line 55: Line 56:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
==== Spain Phone ====
+
====Spain Phone====
 
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
 
spainphones = r"(?:(?:\+?34(?:[ \t|\-])?)?[9|6|7](?:(?:\d{1}(?:[ \t|\-])?[0-9]{3})|(?:\d{2}(?:[ \t|\-])?[0-9]{2}))(?:[ \t|\-])?[0-9]{2}(?:[ \t|\-])?[0-9]{2})"
 
spainphones = r"(?:(?:\+?34(?:[ \t|\-])?)?[9|6|7](?:(?:\d{1}(?:[ \t|\-])?[0-9]{3})|(?:\d{2}(?:[ \t|\-])?[0-9]{2}))(?:[ \t|\-])?[0-9]{2}(?:[ \t|\-])?[0-9]{2})"
 
</syntaxhighlight>
 
</syntaxhighlight>

Navigation menu