I'm trying to match a char within a subset of chars, where either side of the matching char could be anything.
heres an example:
{{ SITE_AGGREGATE_SUBNET }}.3 remote-as {{ BGP-AS }}
against the above, I want to match anything between {{ and }} that has a dash "-" in it.
my regex pattern thus far is:
(?<={{)(.*?-.*?)(?=}})
but this is creating a match for the whole test string returning:
SITE_AGGREGATE_SUBNET }}.3 remote-as {{ BGP-AS
Is anyone able to see what I'm missing? I understand why my regex doesn't work as expected but not how to fix it.
Thanks