Hi All,
I'm trying to do a regex on a string, here is an excerpt,
This is the part that I want to target "end_address":"1901 SE Port St. Main Blvd. Tampa, FL 34952","end_location" so I can replace the address.Code:...},"end_address":"1901 SE Port St. Main Blvd. Tampa, FL 34952","end_location" ...(data)... "end_location" ...(data)... "end_location"
This is my regex
It works but the problem is that the regex spans all end_location (there should be many end_location) and wipes out a huge chunk of data, this leaves only one end_location.Code:string = string.replace(/end_address.*end_location/, 'end_address":"1895 main street North","end_location');
I just need to match the first occurrence of end_location and not the last occurrence of end_location.
Thanks,
Loren



Reply With Quote
Bookmarks