Template
Hello, I'm {{name}} from {{City}}, {{from_state}}
to Regex using (?m){{(?P<groupName>[^{}]*)}}
Hello, I'm (?P<name>.*) from (?P<City>.*), (?P<from_state>.*)
Run on
Hello, I'm John from Dallas, TX
To Get
{
name: "John",
City: "Dallas",
from_state: "TX"
}
Template to Regex - Regex101
String to Data - Regex101
Template and
Hello, I'm {{name}} from {{City}}, {{from_state}}
Data substituted into
{
name: "John",
City: "Dallas",
from_state: "TX"
}
substituted into String
Hello, I'm John from Dallas, TX