Created
May 13, 2020 03:27
-
-
Save McLarenCollege/363028078329b399b0ab5f39bb7b4929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
RegExp expression = RegExp(r'[cmf]an'); | |
Iterable<RegExpMatch> matches = expression.allMatches(searchString); | |
matches.forEach((match) => print(match.group(0))); | |
} | |
String searchString = "Ana Bob Cpc aax bby ccz"; | |
// How do we match 'Ana', 'Bob' and 'Cpc'? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment