Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. // Using `x` flag with `re` shorthand
  2. // Meta-chars like \d can be escaped using single slash.
  3. // Plugin should specify `useRe` option.
  4.  
  5. re`/
  6.  
  7. # A regular expression for date.
  8.  
  9. (?<year>\d{4})- # year part of a date
  10. (?<month>\d{2})- # month part of a date
  11. (?<day>\d{2}) # day part of a date
  12.  
  13. /x`;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement