Skip to content

Instantly share code, notes, and snippets.

@masak
Created December 21, 2009 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masak/260695 to your computer and use it in GitHub Desktop.
Save masak/260695 to your computer and use it in GitHub Desktop.
$ ./test-regex 'xa*?y' xaaaay
Concat[
Literal ('x')
Quant[
Literal ('a')
]
Literal ('y') # yep, that indentation is a Rakudo bug
]
Literal matching "xaaaa": MATCH
Quant matching "aaaay": MATCH
Literal matching "aaaay": FAIL
Concat matching "aaaay": FAIL
Literal matching "aaaay": MATCH
Quant matching "aaay«": MATCH
Literal matching "aaay«": FAIL
Concat matching "aaay«": FAIL
Literal matching "aaay«": MATCH
Quant matching "aay«E": MATCH
Literal matching "aay«E": FAIL
Concat matching "aay«E": FAIL
Literal matching "aay«E": MATCH
Quant matching "ay«EN": MATCH
Literal matching "ay«EN": FAIL
Concat matching "ay«EN": FAIL
Literal matching "ay«EN": MATCH
Quant matching "y«END": MATCH
Literal matching "y«END": MATCH
Concat matching "«END»": MATCH
RxContainer matching "«END»": MATCH
<xaaaay @ 0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment