We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from stack overflow.
http://play.golang.org/p/ZGO_inicCG
package main import ( "fmt" "regexp" ) func main() { r, _ := regexp.Compile("* * *") r2 := r.ReplaceAll([]byte("* * *"), []byte("<hr>")) fmt.Println(r2) } panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0xffffffff addr=0x0 pc=0x8c0c2] goroutine 1 [running]: regexp.(*Regexp).get(0x0, 0x512a, 0x104400f0, 0x178c0e) /usr/src/go/src/regexp/regexp.go:192 +0x1e2 regexp.(*Regexp).doExecute(0x0, 0x0, 0x0, 0x10436190, 0x5, 0x8, 0x0, 0x0, 0x0, 0x2, ...) /usr/src/go/src/regexp/exec.go:423 +0x80 regexp.(*Regexp).replaceAll(0x0, 0x10436190, 0x5, 0x8, 0x0, 0x0, 0x2, 0x1041971c, 0x0, 0x0, ...) /usr/src/go/src/regexp/regexp.go:486 +0x120 regexp.(*Regexp).ReplaceAll(0x0, 0x10436190, 0x5, 0x8, 0x10436198, 0x4, 0x8, 0x512a, 0x0, 0x0, ...) /usr/src/go/src/regexp/regexp.go:549 +0x140 main.main() /tmp/sandbox739482667/main.go:10 +0x160
The text was updated successfully, but these errors were encountered:
What's the bug? It should crash earlier? r is nil.
Sorry, something went wrong.
The ignored error is: error parsing regexp: missing argument to repetition operator: *
*
On Mon, Feb 23, 2015 at 12:24 PM, Brad Fitzpatrick <notifications@github.com
wrote: What's the bug? It should crash earlier? r is nil. — Reply to this email directly or view it on GitHub #9965 (comment).
wrote:
— Reply to this email directly or view it on GitHub #9965 (comment).
Sorry for the noise.
No branches or pull requests
from stack overflow.
http://play.golang.org/p/ZGO_inicCG
The text was updated successfully, but these errors were encountered: