my regex is (\[((?!attr1)[^\]])*\])
and want to make it a compiled template and pass the "attr1" part dynamically.
input string root/element1/element2[@attr1='abc']/element3[attr2='xyz']/element4/element5[attr3='pqr']/element6/element7
Want to pass the attr1, attr2, attr3 dynamically to the regex template and trying to work with one regex object for performance reasons. can you please help me?