begin // text in tag (lazy quantification) var s := 'abc def ghi'; foreach var m in s.Matches('(?<=)(.*?)(?=)') do Println(m.Value, m.Index); // take words in parentheses s := 'one two three four five'; Regex.Replace(s,'\w+','<$0>').Println; end.