Last active
December 3, 2019 19:15
-
-
Save asavchuk/5a7c7507a35361bd82dd07af497d5a13 to your computer and use it in GitHub Desktop.
This file contains hidden or 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() { | |
String _myText = 'Netflix.com (Amste rdam)'; | |
print(_clean(_myText)); | |
} | |
_clean(String s) { | |
return s.replaceAll(RegExp(r'\(.*\)'), '') | |
.replaceAll(RegExp(' +'), ' ').trim(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment