In VSCode: I would like to do a wildcard replace of:
rgb(1, 1, 1 ,1)
with:
rgba(1, 1,1 ,1)
Essentially when an alpha value is specified, the datatype should be changed from "rgb" to "rgba". Where alpha is not specified e.g rgb(1,1,1) - they should remain unchanged.
I tried:
Find: rgb(.*,.*,.*,.*)
Replace: rgba($1)
which obviously did not work. What would be the correct regex syntax to achieve this? Thank you.
Update: Please note that some locations there are spaces before/after commas. Not consistent.