I’m trying to capture a SKU
of a product from localstorage
in javascript
the item is a html string and i’m trying to figure out a regex
that capture that SKU id
the localstorage
return looks like this:
<li class="cart__item">SKU: MLB2046549757 | NAME: Notebook Multilaser Legacy Book Pc310 Preta 14.1 , Intel Celeron N3000 4gb De Ram 64gb Ssd, Intel Hd Graphics 1366x768px Windows 10 Home | PRICE: $1415</li><li class="cart__item">SKU: MLB2046549757 | NAME: Notebook Multilaser Legacy Book Pc310 Preta 14.1 , Intel Celeron N3000 4gb De Ram 64gb Ssd, Intel Hd Graphics 1366x768px Windows 10 Home | PRICE: $1415</li>
i tried (?:SKU: ){13}
regex to get e.g. MLB2046549757
SKU id but it didn’t worked.
I need to capture all 13 digits after SKU:
and save it in an array.
Anyone have an idea how could i do that?