Created
June 25, 2022 18:37
-
-
Save hasancanakgunduz/a9be45fac3ce8b0a92ef272fdc243a20 to your computer and use it in GitHub Desktop.
RegexConversion
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
let oldRegex = /\b[A-Za-z][A-Za-z0-9]{2,15}\b/ | |
let newRegex = Regex { | |
Anchor.wordBoundary | |
CharacterClass( | |
("A"..."Z"), | |
("a"..."z") | |
) | |
Repeat(2...15) { | |
CharacterClass( | |
("A"..."Z"), | |
("a"..."z"), | |
("0"..."9") | |
) | |
} | |
Anchor.wordBoundary | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment