[ create a new paste ] login | about

Link: http://codepad.org/99RZZQpp    [ raw code | fork ]

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


Create a new paste based on this one


Comments: