I'm trying to match just the characters between some set characters using regex? I'm very new to this but I'm getting somewhere...
I want to match all instances of text between '[[' and ']]' in the following string:
'Hello, my [[name]] is [[Joffrey]]'.
So far I've been able to retrieve [[name
and [[Joffrey
with the following regex:
\[\[([^\]])*\g
I've experimented with grouping etc but can't seem to get the 'contents' only (name
and Joffrey
).
Any ideas?
Thanks