I am trying to find the component in all files with specific attribute. Tried this regex pattern <Button[^>]*[\n\s]+className[^>]*>
. 95% it works fine.
You can see in this above example. Button component with condition attribute won't match. It has className attribute too. It should match. It didn't match because of this greater than character =>
in condition attribute line. So, It stops even before the component close tag.
How do I avoid in between greater than character (>
) in this regex pattern?