Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
import {StringBuilder} from "nativescript-stringformat";
var result = new StringBuilder("{0} + {1} = {2}")
.exec(/{(\d+)(\:)?([^}]*)}/g);