[ create a new paste ] login | about

Link: http://codepad.org/i8jLycSZ    [ raw code | output | fork ]

Python, pasted on Aug 10:
1
2
3
4
5
6
7
8
9
import re
str1 = "0341:ea12:345f:f123:4562:ae123"

x = re.match("[[0-9a-f]{1,4}\:]{1,5}[0-9a-f]+",str1)
#t = re.search("[A-Z]+",str1)


#print(t.group())
print(x.group())


Output:
1
2
3
4
Traceback (most recent call last):
  Line 9, in <module>
    print(x.group())
AttributeError: 'NoneType' object has no attribute 'group'


Create a new paste based on this one


Comments: