I am trying to remove all the extra text around last part of the URL. For example, the first one I just want "16 flavor packets variety pack optimum gold standard 100 whey protein powder" as the final text.
Really would appreciate the help. Thanks!!
<option data-url="/store/16-flavor-packets-variety-pack-optimum-gold-standard-100-whey-protein-powder">16 Flavor Packets - Variety Pack</option>
<option data-url="/store/apple-cider-2-lbs-optimum-gold-standard-100-whey-protein-powder">Apple Cider - 2 lbs</option>
<option data-url="/store/apple-pie-2-lbs-optimum-gold-standard-100-whey-protein-powder">Apple Pie - 2 lbs</option>
....but with a LOT more of the same stuff (thousands), so i really need a function to fix it.
Really would appreciate the help. Thanks!!
<option data-url="/store/16-flavor-packets-variety-pack-optimum-gold-standard-100-whey-protein-powder">16 Flavor Packets - Variety Pack</option>
<option data-url="/store/apple-cider-2-lbs-optimum-gold-standard-100-whey-protein-powder">Apple Cider - 2 lbs</option>
<option data-url="/store/apple-pie-2-lbs-optimum-gold-standard-100-whey-protein-powder">Apple Pie - 2 lbs</option>
....but with a LOT more of the same stuff (thousands), so i really need a function to fix it.