Blogger Template by Blogcrowds.

Script use to get the pincode from a address. I used regulatr expression to find it. At first, we will check check pincode end of address. If we didn't get, then check between address. Here I assumed pincode starts with 7 and len should be 6 (ex 700002)


def getPin(myStr):"7(\d{0,5})$",myStr)# check for pincode end of string
    if not pin:"7(\d{0,5})[ ]",myStr) # check for pincode in between string
    if pin:
        return ''

Newer Posts Older Posts Home