How to use dynamic tag name in praseDOM

Hi in my use case we have dynamic tag which gets created with some prefix i want to create Node for all such tags is there a way to achieve this

Example we create a tag like “macro-123” etc i want to check for that macro prefix in tag name

I guess having this inside a div with some class helps