i am dealing with strings in vuejs. Now I have 4 url strings:
https://web-sand.com/product/slug/apple-iphone-13
https://web-sand.com/product/slug/samsung-galaxy
https://web-sand.com/product/slug/xiaomi-red
https://web-sand.com/product/slug/apple-ipad
Now I want to process to get the final string. Since my string is not fixed length using fixed ways is not efficient. Result I want to get :
apple-iphone-13
samsung-galaxy
xiaomi-red
apple-ipad
Everyone please give me any comments, thanks.