I have a string like below
atom:link[@me="samiron" and @test1="t1" and @test2="t2"]
and I need a regular expression which will generate the following back references
#I would prefer to have
$1 = @test1
$2 = t1
$3 = @test2
$4 = t2
#Or at least. I will break these up in parts later on.
$1 = @test1="t1"
$2 = @test2="t2"
I've tried something like ( and [@\w]+=["\w]+)*\]
which returns only last match and @test2="t2"
. Completely out of ideas. Any help?
Edit:
actually the number of @test1="t1"
pattern is not fixed. And the regex must fit the situation. Thnx @Pietzcker.