On Mon, Sep 11, 2017 at 09:48:01AM -0700, Dan Zwell wrote:
> 
> `|` matches the longest input:
> > 'ab' ~~ / ^:ratchet [ . | .. ] $ /
> 「ab」
> 
> If the regex contains empty code blocks, backtracking fails:
> > 'ab' ~~ / ^:ratchet [ {}. | {}.. ] $ /
> Nil

Isn't the whole point of :ratchet to turn off backtracking...?  From S05 (which 
I know isn't official anymore but it describes what :ratchet does or was 
intended to do):

   "The new :r or :ratchet modifier causes this regex to not backtrack by 
default."

It looks to me like the two above examples are working exactly as 
designed/intended.

Pm

Reply via email to