~jacksonchen666/brainfuck_interpreter

1ba581f6140482b14433de3e09415a93ab4373e3 — Jackson Chen 1 year, 15 days ago b1ace52
fix regex

no idea why it doesn't work, but this works
1 files changed, 1 insertions(+), 1 deletions(-)

M brainfuck.go
M brainfuck.go => brainfuck.go +1 -1
@@ 128,7 128,7 @@ func InitProgramState(code *string) *ProgramState {
	var cpointer int = 0
	var loopStack = make([]int, 0)

	regex := regexp.MustCompile(`[^+-<>,.\[\]]`)
	regex := regexp.MustCompile(`[^\[\]<>,.+-]`)
	var newCode string = regex.ReplaceAllString(*code, "")

	return &ProgramState{