Created
December 19, 2016 18:27
-
-
Save KinoAR/ddfcd9fd8f8ca82be31077ba546fde8e to your computer and use it in GitHub Desktop.
Tutorial Code for Regular Expressions
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
//============================================================================= | |
// RegExPatterns.js | |
//============================================================================= | |
'use strict'; | |
//Pattern for: <cooldown: 12 > | |
//Pattern 1 matches < cooldown : 12 >, <cooldown:12>, <cooldown: 12>, etc | |
/<\s*cooldown\s*:\s*(\d+\.*\d*)\s*>/ig; | |
//Pattern 2 matches <cooldown:12> Only | |
/<cooldown:(\d+\.*\d*)>/ig; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment