Reputation: 18855
Not sure how to do this. Probably best illustrated with the following screen:
So I want the replaced text to read yo yo
rather than yo
.
That's both of the occurrences of {{.*}}
rather than the large occurrence that wraps both of the search text.
Thanks.
Upvotes: 1
Views: 52
Reputation: 424983
You've coded a greedy quantifier .*
, which consumes as much as possible while still matching - ie it matches from the first {{
to the last }}
.
You want a reluctant quantifier:
{{.*?}}
which matches as little as possible, while still matching - ie it will match from the first {{
to the next }}
.
Upvotes: 2