Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. const REGEX_CONST_LET_VAR = XRegExp(`
  2. \A
  3. (?<declaration_keyword>const|let|var)\s+ # <declaration_keyword>
  4. (?<assignment>.+?) # <assignment> variable assignment
  5. \s*=\s*
  6. (?<import_function>\w+?)\( # <import_function> variable assignment
  7. (?<quote>'|\") # <quote> opening quote
  8. (?<path>[^\\2\n]+) # <path> module path
  9. \k<quote> # closing quote
  10. \);?
  11. \s*
  12. \Z
  13. `, 'xs' // free-spacing, dot-match-all
  14. +);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement