This Gist was automatically created by Carbide, a free online programming environment.
Created
October 28, 2022 18:35
-
-
Save carbide-public/c07d076c1bd5624acd244a6259e2b36f to your computer and use it in GitHub Desktop.
word rearranger
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
const wordsReg = /(\w+|\W+)/g | |
const parts = /(th|st|ch|sh|ng|in|at|en|so|ab|er|da|cr|or|(\w)\2*)/gi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment