Create and use a Regular Expression
suggest changevar regExp = new RegExp(r"(\w+)");
var str = "Parse my string";
Iterable<Match> matches = regExp.allMatches(str);
It’s a good idea to use “raw strings” (prefix with r
) when writing regular expressions so you can use unescaped backslashes in your expression.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents