# README
regex_tree
a regular expression prefix tree.
Usage
package main
import (
"fmt"
"github.com/lovego/regex_tree"
)
func main() {
root, err := regex_tree.New("/", 1)
if err != nil {
fmt.Println(err)
return
}
root.Add("/users", 2)
root.Add(`/users/(\d+)`, 3)
fmt.Println(root.Lookup("/"))
fmt.Println(root.Lookup("/users"))
fmt.Println(root.Lookup("/users/1013"))
fmt.Println(root.Lookup("/users/a013"))
// Output:
// 1 []
// 2 []
// 3 [1013]
// <nil> []
}
# Functions
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author