I'm trying to match a substring using regex.
An example of the substring I've got is: "{{simple-array.text}}{{simple-array.option}}"
.
Using the following pattern: {(.*?)}
, I get the following two matches: {{simple-array.text}
and {{simple-array.option}
.
I'm not sure how to get the following output using regex: {simple-array.text}
and {simple-array.option}
.
Very close!
Regex Pattern : {({.*?})}
Returns : {simple-array.text}
and {simple-array.option}
within group 1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.