Skip to content

Instantly share code, notes, and snippets.

@nimi0112
Created January 27, 2022 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nimi0112/987ac75db05914adfd48dd2ff8d3084b to your computer and use it in GitHub Desktop.
Save nimi0112/987ac75db05914adfd48dd2ff8d3084b to your computer and use it in GitHub Desktop.
Regex for string pattern replace
void main() {
String id1= "google-oauth2-117279235649443415135";
String id2 = "auth0|61e7c4b1b1392e00699b50af";
print(id1.replaceAll(RegExp('[|-]'), ''));
print(id2.replaceAll(RegExp('[|-]'), ''));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment