RegEX Selector in CSS

Regex selector in CSS.

div[class^=‘card’] → It will check for the div that has a class start with the word ‘card’. eg: card-dark, card-normal etc.

div[class^=‘card’][class*=‘normal’] → It will check for the div that has a class start with the word ‘card’ and the word ‘normal’ has to be anywhere in the class name. eg: card-normal, card-dark-normal, card-normal-light etc.

div[class^=‘card’][class$=‘prioritize’] → It will check for the div that has class start with the word ‘card’ and the word ‘prioritize’ must at the end of the class name. eg: card-light-prioritize card-light-new-prioritize etc.

described tutorial:- https://www.youtube.com/watch?v=Myo-yNGpVc8

demo pen:- https://codepen.io/kmfoysal06/pen/ByBRyqO