SSteven's public fiddles
-
Alternation -
Match a bb-tag
-
Alternation -
Match a bb-tag
-
Alternation -
Match a bb-tag
-
Alternation -
Match a valid time in the format hh24:mm
-
Alternation -
Match a valid time in the format hh24:mm
-
Alternation -
Match programming languages
-
Backreference in pattern -
use named capturing groups
-
A RegExp object with the g flag
No-Library (pure JS), HTML, CSS, JavaScript
-
Negative/positive Whole number or Decimal number
Match a Negative/positive whole number or decimal number.
-
Whole number or Decimal number
Match a whole number or decimal number.
-
Decimal number
Match a decimal number.
-
Backreference in pattern -
numbered capturing groups
-
Backreference in pattern
Demonstrate the need. This regex won't work.
-
Non-capturing groups
No-Library (pure JS), HTML, CSS, JavaScript
-
Capturing groups - named groups
Reformat dates from "yyyy-mm-dd" to "dd.mm.yyyy".
-
Capturing groups - named groups
Replace a string containing "FirstName LastName" with the string "LastName FirstName", using named groups.
-
Capturing groups
Replace a string containing "FirstName LastName" with the string "LastName FirstName".
-
Capturing groups - named groups
Match all dates in the format "yyyy-mm-dd".
-
Capturing groups - named groups
Match a date in the format "yyyy-mm-dd".
-
Capturing groups
Match all HTML tags - use the g flag and str.MatchAll() and destructure the array results.