From: Nicolas Boisselier Date: Wed, 31 May 2023 22:15:43 +0000 (+0200) Subject: Fix regexp when html as attributes X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=3a0085d58ad152f45ebfbd2fd2966e71d3bb7d4f;p=nb.git Fix regexp when html as attributes --- diff --git a/lib/postgres/css_reference.sh b/lib/postgres/css_reference.sh index 0cd7a91a..bbcd89b1 100755 --- a/lib/postgres/css_reference.sh +++ b/lib/postgres/css_reference.sh @@ -1,7 +1,7 @@ #!/bin/bash -l http_get https://www.w3schools.com/cssref/index.php | \ xmllint --html --xpath '/html/body//div[@id="cssproperties"]//table' - 2>/dev/null | \ -perl -pe 's|([^<]+)|https://www.w3schools.com/cssref/$1$2|' | \ +perl -pe 's|]*>([^<]+)|https://www.w3schools.com/cssref/$1$2|' | \ html2csv | \ sed -E "s,(\\\\),\1\1," | \ awk 'BEGIN{FS="\t"}{print $2"\t"$3"\t"$1}' \