Skip to content

Instantly share code, notes, and snippets.

@atreeon
Last active May 17, 2018 13:31
Show Gist options
  • Save atreeon/6b0e70a6b3ee4e82b949039615614e07 to your computer and use it in GitHub Desktop.
Save atreeon/6b0e70a6b3ee4e82b949039615614e07 to your computer and use it in GitHub Desktop.
OneByteString from regex split
void main() {
var sourceText = '**this** and **my other string** please';
var regexAsterisk = new RegExp(r"\*\*(.*?)\*\*");
var splits = sourceText.split(regexAsterisk);
for (var split in splits) {
print("IsEmpty:" + split.isEmpty.toString() + ":" + split);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment