From 8d9e99a6917774bbc2ca0d90b39c26d866510964 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Mon, 19 Sep 2016 18:32:17 +0200 Subject: [PATCH] vtysh: make extract.pl more whitespace-robust "DEFUN (" could only match with exactly one space between DEFUN and opening brace. Allow any amount of space. Signed-off-by: David Lamparter --- vtysh/extract.pl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in index cd19fa754b..b4884b9687 100755 --- a/vtysh/extract.pl.in +++ b/vtysh/extract.pl.in @@ -94,7 +94,7 @@ foreach (@ARGV) { # $_ will contain the entire string including the DEFUN, ALIAS, etc. # We need to extract the DEFUN/ALIAS from everything in ()s. # The /s at the end tells the regex to allow . to match newlines. - $_ =~ /^(.*?) \((.*)\)$/s; + $_ =~ /^(.*?)\s*\((.*)\)$/s; my (@defun_array); $defun_or_alias = $1; -- 2.39.5