First I’m sorry, I’ve been looking for this here and in others links but i didn’t get it yet.
I’m having difficulties to replace different strings but with the same pattern using an specific regex.
Follow some examples:
model="data.extra.profile.name"
model="data.age"
model=“data.more.some”
And here’s the change that I need:
model="{{ data.extra.profile.name }}“
model=”{{ data.age }}“
model=”{{ data.more.some }}"
So, I’m using the expression (\model="data.*?\")
to find those strings, but i’m not understanding how replace without loose the middle value.
I saw something related using $1, maybe this could be the position if I use something like:
(\model="data.*?\")|(\model="{{data.*?\}}")
I would have $1 and $2? I don’t know.
Hope someone could explain that.