fork download
  1. import 'dart:io';
  2.  
  3. void main() {
  4. var parts = "this is {{A}} sample {{text}} ...".split(RegExp("\\s*(?={{.*?}})|(?<={{.*?}})\\s*"));
  5. print(parts);
  6. }
Success #stdin #stdout 0.86s 127484KB
stdin
Standard input is empty
stdout
[this is, {{A}}, sample, {{text}}, ...]