Skip to content

Handle comple error of regular expression #28

@fujimura

Description

@fujimura
$ git gsub "([[:^alpha:]]" "OK" README.md
panic: regexp: Compile(`([[:^alpha:]]`): error parsing regexp: missing closing ): `([[:^alpha:]]`

goroutine 1 [running]:
regexp.MustCompile({0x16b64ef10, 0xd})
        /opt/homebrew/Cellar/go/1.20.2/libexec/src/regexp/regexp.go:319 +0xac
main.addSub(0x1400000e048, {0x16b64ef10?, 0x3?}, {0x16b64ef1e, 0x2}, 0x1048d46e0)
        /Users/daisuke.fujimura/go/pkg/mod/github.com/fujimura/[email protected]/main.go:122 +0x70
main.(*CLI).Run(0x14000074f48, {0x14000010090, 0x3, 0x3})
        /Users/daisuke.fujimura/go/pkg/mod/github.com/fujimura/[email protected]/main.go:169 +0x410
main.main()
        /Users/daisuke.fujimura/go/pkg/mod/github.com/fujimura/[email protected]/main.go:239 +0x88

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