Hey there,
I have been working on this regex:
{link=([^|{}]+)\||([^|{}]+)\||([^|{}]+)}
I wish to capture any non-pipe or bracket chars and place them in appropriate backreference (group).
How can I return the following:
- If test string is
{link=a}returnainto group 3. - If test string is
{link=a|b}returnainto group 2,binto group 3. - If test string is
{link=a|b|c}returnainto group 1,binto group 2,cinto group 3.
Having issues where the strings are not correctly being picked up into correct groups on all permutations with the above regex. I think I have bracket grouping issues and/or OR (|) statement issues.
Thanks in advance.