I am trying to get the text from a css files, it's all the text that is before the : (overflow, white-space, width, margin-top) and make it blue
.MenuContainerScroll {
overflow: auto;
overflow-y: hidden;
white-space: nowrap;
width: 100%;
margin-top: 1vw;
}
i am using the following regex:
html.replace(/(([A-z'-]+)\:)/g, '<span class="blue">$1</span>');
what works perfect, until it meets this:
.MenuContainerScroll::-webkit-scrollbar {
width: 6px;
height: 1vw;
}
now .MenuContainerScroll also turns blue, what i would like it to select every word before the : between the { } does that make sense? I get to select text between with
(/(\/\*(.*?)\*\/)/g
but i don't get how to combine these two, thanks