Skip to content

A bug when .* in the content to match #49

@wgplt

Description

@wgplt

The code that caused the error:

image

Why nil ?

This should be the right result:

image

Sample code:

`package main

import (
"fmt"

"github.com/dlclark/regexp2"

)

func main() {

r, err := regexp2.Compile(`(?<=1234\.\*56).*(?=890)`, regexp2.Compiled)

if err != nil {
	panic(err)
}

m, err := r.FindStringMatch(`1234.*567890`)
if err != nil {
	panic(err)
}

fmt.Println(m)

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions