I got the regex from a friend, he said that he got the regex from vue repository.
Now that you are asking I realized that I don't know the reason for make the regex in that way, the regex can be simplified to: {{(.+)?}}.
{{ Match two open brackets. }} Match two close brackets.
The point . match anything and the + extend the point to match more than one character, the ? make optional the expression inside of the parenthesis.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I got the regex from a friend, he said that he got the regex from vue repository.
Now that you are asking I realized that I don't know the reason for make the regex in that way, the regex can be simplified to:
{{(.+)?}}
.{{
Match two open brackets.}}
Match two close brackets.The point
.
match anything and the+
extend the point to match more than one character, the?
make optional the expression inside of the parenthesis.