Trying to extract the background color from a CSS string:
"body{
background-color: #dfdfdf;
}
"
The color could also be in rgba(120,120,120) format. I am looking for a way to extract that color using regular expressions. I have tried using this pattern:
^(?=background\-color:\s?)[^;]+$
Unfortunately, it seems like it's not working as expected.