Question: a few lines of code to extract the full zip code (state and zip) from the following text string: The address is 1600 Pennsylvania Avenue,

a few lines of code to extract the full zip code (state and zip) from the following text string: "The address is 1600 Pennsylvania Avenue, N.W.. Washington, DC 20500, USA." Store the text in a string and then write the code you need and show that it works to extract "DC 20500". It shouldnotmatch lower case, e.g., "dc 20500". Test this with another line of code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!