I have a dataframe of >10,000 rows. Column c
is the column containing the full address in string, including the postal code. I would like to extract the postal code digits (6 digits) into a new column. All 6-digit postal codes come after the word, Singapore.
An example is as follows:
df <- c(a,b,c)
c <- c("YVL WELLNESS CLINIC 510 CAMDEN STREET #01-01, Singapore 248180", "MOMO CLINIC 512 CHOA CHU KANG STREET, #10-1102, Singapore 150902",...)
# need to extract 6-digit postal codes in c, into a new column, d
How do I extract the 6 digit postal codes into a new column, d
?
Thank you!