Reputation:
I have a big array and I need to get everything before the colon between quotes
I've tried this regex but it didn't work for me.
^([/.+?(?=:)]+)$
this is my array now:
A0 05 15 : "rgb(60, 50, 51)",
A0 05 25 : "rgb(82, 69, 71)",
S 2030-B : "rgb(120, 172, 191)",
S 2030-B10 : "rgb(119, 175, 187)"
What I want it do be:
"A0 05 15" : "rgb(60, 50, 51)",
"A0 05 25" : "rgb(82, 69, 71)",
"S 2030-B" : "rgb(120, 172, 191)",
"S 2030-B10" : "rgb(119, 175, 187)"
Upvotes: 0
Views: 67