Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 382 Bytes

README.MD

File metadata and controls

22 lines (15 loc) · 382 Bytes

Regexp

a regular expression engine based on deterministic finite automaton

warning: supports ascii character only

package main

import (
	"fmt"

	"github.com/Salpadding/regexp/re"
)

func main() {
	r, _ := re.Compile(`[a-z0-9A-Z]+@[a-z0-9A-Z]+\.[a-z0-9A-Z]+`)
	fmt.Println(r.Match("[email protected]"))
	fmt.Println(r.Match("abbbbb@yyy"))
}