Last active
July 20, 2022 19:41
-
-
Save David263/0da28904dbb173049af466f26f7a749a to your computer and use it in GitHub Desktop.
How to write a regular expression/regex to recognize your own definition of a word
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
Let's say you want your word to be an identifier containing a letter, digit, hyphen, period, or minus sign. It is this easy: | |
[a+-zA-Z0-9._-]?!([a+-zA-Z0-9._-]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment