From 34871bf43d2e29f2def3b22d9995b31695f7dc1e Mon Sep 17 00:00:00 2001 From: Matthias Hannig Date: Mon, 5 Dec 2016 16:36:59 +0100 Subject: [PATCH] another day, another regex fix. --- bird/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bird/parser.go b/bird/parser.go index 0bd1a03..8a1fdde 100644 --- a/bird/parser.go +++ b/bird/parser.go @@ -130,7 +130,7 @@ func parseRoutes(input []byte) Parsed { start_def_rx := regexp.MustCompile(`^([0-9a-f\.\:\/]+)\s+via\s+([0-9a-f\.\:]+)\s+on\s+(\w+)\s+\[([\w\.:]+)\s+([0-9\-\:\s]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*`) second_rx := regexp.MustCompile(`^\s+via\s+([0-9a-f\.\:]+)\s+on\s+(\w+)\s+\[(\w+)\s+([0-9\-\:]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*$`) type_rx := regexp.MustCompile(`^\s+Type:\s+(.*)\s*$`) - bgp_rx := regexp.MustCompile(`^\s+BGP.(\w+):\s+(\w+)\s*$`) + bgp_rx := regexp.MustCompile(`^\s+BGP.(\w+):\s+(.+)\s*$`) community_rx := regexp.MustCompile(`^\((\d+),(\d+)\)`) for _, line := range lines { if specialLine(line) || (len(route) == 0 && emptyLine(line)) {