I need to get
first="john"
second="doe"
and
firstz="johnz"
secondz="doez"
from this text:
any text here [link first="john" second="doe"] anytexthere [link firstz="johnz" secondz="doez"]
The pattern need to get the [link in the start, and the ] in the end, and can have multiples properties inside...
[link first="john" second="doe"] ✅ -> first="john", second="doe"
[lin first="john" second="doe" ❌
[link first="john second="doe"] ❌
[linksecond="doe"] ❌
Obs: "first", "john", "second", "doe" can be anything.
This is my best try: https://regex101.com/r/cJnYIF/1
\[link (\w+="\w+")\]
But this only capture the first
I've also tried with positive lookbehind, but without success https://regex101.com/r/jnk6gM/397
Someone have idea how to solve this? If possible XD