Skip to content

regexp: false negative in MatchString #1373

@rsc

Description

@rsc
package main

import (
    "fmt"
    "regexp"
)

func main() {
    match, err := regexp.MatchString(`\([^()]+\)`, `((x))`)
    if err != nil {
        panic(err)
    }
    if !match {
        fmt.Println("should match, does not")
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions