Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ...
- let match, lastIndex = 0, matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|**|*|(|)/g
- while ((match = matcher.exec(pattern))) {
- if (match.index !== lastIndex) {
- // ...
- }
- // ...
- lastIndex = matcher.lastIndex
- }
- // ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement