How to target all scss variables which is used for styling with regex

Viewed 25

Hi i want to target all the scss variables which is used for styles

Question: i want to target all the scss variables which comes after : with $name

for example let say i have defined a variable like so

$alpha-male: blue;

.my-favourite-alpha-male{
   color: $alpha-male;
}

now my regex should be such that it must highlight $alpha-male; on the right hand side of color:

here is what i have tried

(:)(\s+\$+.*;)

Which fails so many test cases

Demo: https://regex101.com/r/WtyoF6/1

Request: please include any other testcases if you know.

Please help me thanks in advance !!!

0 Answers
Related