Last active
March 4, 2024 00:04
-
-
Save VladSez/ebeb9a206f605bfd45e20d5bc99d10ce 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
// split by ": " or "; " | |
const splitted = "Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green".split(/: |; /g); | |
// res: ['Game 1', '3 blue, 4 red', '1 red, 2 green, 6 blue', '2 green'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment