We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9708a1c commit 71260a8Copy full SHA for 71260a8
main.go
@@ -39,16 +39,16 @@ func run() error {
39
return nil
40
}
41
42
-var matcher = regexp.MustCompile(`^(FROM|from) \w+ (AS|as) (\w+)$`)
+var matcher = regexp.MustCompile(`^(FROM|from) ([\w:.-]+) (AS|as) (\w+)$`)
43
44
func parse(r io.Reader) ([]string, error) {
45
scanner := bufio.NewScanner(r)
46
var result []string
47
for scanner.Scan() {
48
line := scanner.Bytes()
49
m := matcher.FindAllSubmatch(line, -1)
50
- if len(m) > 0 && len(m[0]) > 3 {
51
- result = append(result, string(m[0][3]))
+ if len(m) > 0 && len(m[0]) > 4 {
+ result = append(result, string(m[0][4]))
52
53
54
return result, scanner.Err()
0 commit comments