I'm using my custom button component like this -> <h-button text primary outline>. I want to write a regex that would let me select every button that has one or many props. I can easily select everything in the button tag using -> <h-button(.*?)> regex, but I don't know how to select only a specific word or two.
Example:
Let's say I have 3 buttons
<h-button text primary outline>
<h-button primary text outline>
<h-button text success outline>
And I want to find every button that has text and primary in it.
Expected result:
Regex should find these two buttons
<h-button text primary outline>
<h-button primary text outline>