Skip to content

lookaround/lookbehind regex that used to work not working anymore #6265

Description

@Artturin

Describe the bug

Error: Failed to compile the regex pattern: "(?<=got.....)sha256.{45}" with error: error parsing regexp: invalid or unsupported Perl syntax: `(?<`

To Reproduce
Steps to reproduce the behavior:

  1. run echo "got: sha256-L8wivKxb5OWfbnU/7Rs6GzecDLOCxAsukoO2Qj7egfU=" | kitten hints --program @ --type regex --regex '(?<=got.....)sha256.{45}'
  2. See error

https://regex101.com/r/ieCHXq/1 shows that it should work with PCRE/2, if golang is chosen from the flavors then it fails so it looks like its not supported in go regexp :(

kitty 5b8b91b

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions