Skip to content

Implement lookaround #1

Open
Open

Description

@mdinger
  • lookahead - foo <?after bar> matches foo in foobar
  • negative lookahead - foo <!after bar> matches foo in foobaz
  • lookbehind - <?before foo> bar matches bar in foobar
  • negative lookbehind - <!before foo> bar matches bar in sushibar

An example with both: <?before foo> bar <?after baz> matches bar in foobarbaz

This is different from Perl 6 as noted in perl_changes and is subject to change. I'll need to get experience using it and then compare. Perl 6 may have gotten it correct but I'm not sure or convinced. Granted, I don't think deviating from Perl 6 shouldn't be taken lightly.

I have a PR for this but it doesn't work correctly and I have to do a major revision. Not sure when I'll get to it.

Activity

  1. added this to the 0.0.3 milestone on Sep 16, 2015
  2. olorin37 commented on Dec 10, 2021

    @olorin37

    It would be great to propagate raku / perl6 regexes to other languages and Rust seems good for the beginning...

  3. mdinger commented on Dec 10, 2021

    @mdinger
    OwnerAuthor

    I have not worked on this for a very long time and currently have no plans to currently. If someone decides to start working on this, I can add them as a collaborator or something similar so they can start doing cool things with it.

  4. olorin37 commented on Dec 11, 2021

    @olorin37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions