I have people addresses in string, what I want to do is extract city and state names from these address and store rest of the string as address. problem is I don't have any idea about how long the addresses are.
for example:
let address1 = "Akshardham Temple, Vidyut Nagar, Vaishali Nagar, Chitrakoot, Jaipur, Rajasthan"
let address2 = "Statue of Unity, Statue of Unity Road, Kevadia, Gujarat"
// and some might be just this
let address3 = "New Delhi, Delhi"
what I want is however long string is I want to extract last two entire words(state and city) and rest in another variable.