Thanks to visit codestin.com
Credit goes to github.com

Skip to content

OP_ANYLINEBREAK incomplete in FindRepeated #372

@User4martin

Description

@User4martin
  IsNotMatching('no loop linebreak', 'a\R\Rb', 'a'#13#10'b');
  IsNotMatching('   loop linebreak', 'a\R+\Rb', 'a'#13#10'b');
  • The first test works, \R eats the entire #13#10. The 2nd #R does not match.
  • Yet the 2nd test (which also must match 2 linebreaks does match.

In a OP_STAR (FindRepeated) OP_ANYLINEBREAK changes its preference to match #13#10 as 2 breaks rather than 1. So the same pattern has different behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions