From 64c7775fdacdc3a18adf9eb5ac431b101a5b880d Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Sat, 12 Oct 2019 16:19:10 +0200 Subject: [PATCH] better search pattern for authors --- dot_zsh_functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dot_zsh_functions b/dot_zsh_functions index a087065..06a41d5 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -83,7 +83,7 @@ function aboutpage() { then year=$(curl -sSL "$*" | tr '<' '\r' | \egrep -i "date|datetime" -A 1 | \grep -Eo '\b[[:digit:]]{4}\b' | head -n1) fi - author=$(curl -sSL "$*" | tr '<' '\r' | \egrep -i "author" | \grep -Eo '([A-Z][A-Za-z]+\s[A-Za-z]+)' | head -n1) + author=$(curl -sSL "$*" | tr '<' '\r' | \egrep -i "author" -A 1 | \grep -Eo '([A-Z][A-Za-z]+\s([A-Za-z ]+)*)' | head -n1) yearint=$(($year + 0)) currentyear=$(echo `date +"%Y"`) if [ ! -z "$author" ]