[ create a new paste ] login | about

Link: http://codepad.org/33V3Ptd5    [ raw code | fork ]

Python, pasted on Nov 16:
1
2
3
4
5
6
7
import re
myStr="IC1D1"
p=re.search("([A-Za-z]+)([0-9]+)([A-Za-z]+)([0-9]+)",myStr)
print p.group(1) # display the letter1
print p.group(2) # display the number1
print p.group(3) # display the letter2
print p.group(4) # display the letter2


Create a new paste based on this one


Comments: