|
@@ -1,6 +1,6 @@
|
|
|
package main
|
|
|
|
|
|
-func isMatch(s string, p string) bool {
|
|
|
+func isMatchRegex(s string, p string) bool {
|
|
|
// If former x chars of string matches former y chars
|
|
|
// of pattern, match[x][y] == true, else == false
|
|
|
var match [][]bool
|
|
@@ -44,10 +44,10 @@ func isMatch(s string, p string) bool {
|
|
|
}
|
|
|
|
|
|
// func main() {
|
|
|
-// fmt.Println(isMatch("", ""))
|
|
|
-// fmt.Println(isMatch("ssssss", "p"))
|
|
|
-// fmt.Println(isMatch("ssssss", "s*"))
|
|
|
-// fmt.Println(isMatch("ssssss", "s.*s"))
|
|
|
-// fmt.Println(isMatch("ss", "s.*ss"))
|
|
|
-// fmt.Println(isMatch("ss", "s*"))
|
|
|
+// fmt.Println(isMatchRegex("", ""))
|
|
|
+// fmt.Println(isMatchRegex("ssssss", "p"))
|
|
|
+// fmt.Println(isMatchRegex("ssssss", "s*"))
|
|
|
+// fmt.Println(isMatchRegex("ssssss", "s.*s"))
|
|
|
+// fmt.Println(isMatchRegex("ss", "s.*ss"))
|
|
|
+// fmt.Println(isMatchRegex("ss", "s*"))
|
|
|
// }
|