Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
psujini
Contributor
Contributor

how to extract the pincode from the address field

Hi,

I tried to get the pincod which has given in the last in the address field.

but i couldn't able to get the pin codes which are given in the middle of the address field.

example

 

513B,5TH FLOOR,MINERVA COMPLEX, SAROJINI DEVI ROAD, SECUNDERABAD Andhra Pradesh INDIA 500003
FALT NO.501, PADMANABHA APARTMENTS PEDAWALTAIR VISAKHAPATNAM Andhra Pradesh INDIA 530017
77/2,GURAVARAJUPALLE VILLAGERENIGUNTA-SRIKALAHASTI ROAD RENIGUNTA Andhra Pradesh INDIA 517520
S-6,CLASSIC COMPLEX,PRAKASARAOPETA VISAKHAPATNAM-530 020. Andhra Pradesh INDIA

if you see in the 4th row the pin code is not at last.how to extract  such pin codes.

Note here the string is separated by commas and sometimes with space missed are there.

Any idea is very help to me.

 

 

Labels (2)
4 Replies
vboppudi
Partner - Creator III
Partner - Creator III

Hi,

are you looking for the following output?

0683p000009LxRh.png0683p000009LxIm.png

Assuming that zipcode will be present in last field of sting with "," delimiter.

Regards,

 

psujini
Contributor
Contributor
Author

yes actually.

But the thing is the addresses are seperated some by  comma (,)and  some address are separated by space ( )delimiter also. At that time how we can split. please suggest any idea.

vboppudi
Partner - Creator III
Partner - Creator III

Please provide sample data for your requirement.

 

Regards,

psujini
Contributor
Contributor
Author

Hi,

 Thank you very much !

suppose the address field

has

 

  1. A-125  vertex somagiguda hyderabad-500085
  2. F/89,hythnagar-500038, hyderabad India.
  3. TALLE VALLEY ROAD HAPLI ZERO LOWER SUBANSIRI Arunachal Pradesh INDIA 791120
  4. BOMMIDALA HOUSE, D.NO.5-87-15/A. LAKSHMIPURAM MAIN ROAD, GUNTUR-522 007 A.P. Andhra Pradesh INDIA

like that the address field is separated by comma,some times space and the pin codes in between.

 

Actually i solved in following way

 

first i extract only numeric then last 6 characters,then valid pin codes by lookup table with all region pincodes all region pincodes.  with this logic i could able. to get the pin codes.

 

the problem is partially y solved.

 

And Thank you for the reply