Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. // Using `x` flag with `RegExp`:
  2.  
  3. new RegExp(`
  4.  
  5. # A regular expression for date.
  6.  
  7. (?<year>\\d{4})- # year part of a date
  8. (?<month>\\d{2})- # month part of a date
  9. (?<day>\\d{2}) # day part of a date
  10.  
  11. `, 'x');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement