Created
March 2, 2017 04:42
-
-
Save ccorcos/20c87910f4479448cf2f211e0163ed1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const here = between( | |
zeroOrMore(not(string('<here>'))), | |
between( | |
string('<here>'), | |
zeroOrMore(not(string('</here>'))), | |
string('</here>') | |
), | |
always() | |
) | |
here | |
.run('blah blah <here>hello world</here> blah') | |
.fold( | |
v => console.log('success', v.join('')), | |
e => console.log('error', e) | |
) | |
// => success hello world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment