I have a following regex which basically gets string with hyphens:
/class="(?=\S*[-])([a-zA-Z-]+)/gim
And the input string is:
<div class="hello-world h-123"></div>
<div class="this-is-cool"></div>
However, my problem is that in the input string, it only matches hello-world
but I wanna match h-123
as well using same regex but separately (groups). Basically, I am trying to build a regex which basically gets all strings that contain dash.