Question : Extract output from string

i have multiline textbox in which user enters his complete address from where i wanna extract
information like street, locality, city, zip code etc.
and i want output as in below format

Street|Locality|City|State|PostalCode|Country

In case any of the address field is missing, leave the space blank between the “|” (pipe)
separators. Don’t remove the pipe separators.
For example, if State is not mentioned in the input string, the output should be:
Street|Locality|City| |PostalCode|Country

i am very confused what to do..please help me

i am attaching sample input address..


 
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
Block No. 92/7, CHH type, In front of Gurukul ,Sector-22, Gandhinagar-382022

C/o Jaganath Choudhary, P.O Labpur, Village:Harishpur, Dist: Birbhum, West Bengal

4/3, Visava Heights, D.P. Road, Aundh , Pune, 411007

JEREMY MARTINSON
455 LARKSPUR DR
CALIFORNIA SPRINGS CA  92926-4601

Mr. Jackie CHAN
Flat 25, 12/F, Acacia Building
150 Kennedy Road
WAN CHAI
999077 HONG KONG

MS H WILLIAMS 
FINANCE AND ACCOUNTING
AUSTRALIA POST
219-241 CLEVELAND ST,STRAWBERRY HILLS  NSW  1427

JOHN DOE
CENTER FOR FINANCIAL ASSISTANCE TO DEPOSED NIGERIAN ROYALTY
421 E DRACHMAN
TUCSON AZ 85705-7445
USA

Kay Jay Exports
Post Office Box 924
Ludhiana-141003
INDIA

Answer : Extract output from string

I believe the the first one returns the size of the array (number of elements) and the second one returns the size of one element in the array.
Random Solutions  
 
programming4us programming4us