There are different urls in user_data, I want to change all usernames and passwords in user_data to make them the same. Since the URL directories are different, I want to find the username and password first, starting from the end, and update it with the new username and password.
username and password I want to change: "superuser/123456"
johndoe/123h456 => superuser/123456
james/98c7654 => superuser/123456
robert/32165g4 => superuser/123456
What do you think is the surest and most accurate way to do this using match or gsub ?
local user_data = "http://127.0.0.1/johndoe/123h456/1, http://127.0.0.1/news/james/98c7654/1.jpg, http://127.0.0.1/data/robert/32165g4/1.dat"