Created
March 2, 2017 04:42
-
-
Save ccorcos/4a6e6f0047e75140574e27ea6c671f76 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