X-Git-Url: https://git.sthu.org/?p=mutt-gruvbox.git;a=blobdiff_plain;f=colors-gruvbox-shuber.muttrc;h=4339fabee88a2716fe46ed210812308686f00697;hp=8dd8d190acdc4ef184429c59f0b6598aaf7ad1ed;hb=HEAD;hpb=5adf15fd2683146c26f261eae9b6e38bca344b69 diff --git a/colors-gruvbox-shuber.muttrc b/colors-gruvbox-shuber.muttrc index 8dd8d19..c283d0f 100644 --- a/colors-gruvbox-shuber.muttrc +++ b/colors-gruvbox-shuber.muttrc @@ -62,16 +62,38 @@ color header color142 color234 "^Subject:" color header color108 color234 "^X-Spam-Status:" color header color108 color234 "^Received:" -# BSD's regex has RE_DUP_MAX set to 255. -# schema://stuff -color body color142 color234 "[a-z]{3,255}://[-a-zA-Z0-9@:%._\\+~#=/?&,;]+" -# fully qualified hostnames -color body color142 color234 "[a-zA-Z]([-a-zA-Z0-9_]+\\.){2,255}[-a-zA-Z0-9_]{2,255}" -# mail addresses +# Regex magic for URLs and hostnames +# +# Attention: BSD's regex has RE_DUP_MAX set to 255. +# +# Examples: +# http://some-service.example.com +# example.com +# a.example.com +# some-service.example.com +# example.com/ +# example.com/datenschutz +# file:///tmp/foo +# +# Non-examples: +# 1.1.1900 +# 14.02.2022/24:00 +# 23.59 +# w.l.o.g +# team.its +color body color142 color234 "[a-z]{3,255}://[[:graph:]]*" +color body color142 color234 "([-[:alnum:]]+\\.)+([0-9]{1,3}|[-[:alpha:]]+)/[[:graph:]]*" +color body color142 color234 "([-[:alnum:]]+\\.){2,255}[-[:alpha:]]{2,10}" + +# IPv4 and IPv6 stolen from https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses +color body color142 color234 "((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" +color body color142 color234 "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))" + +# Mail addresses and mailto URLs color body color208 color234 "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" -# mailto URLS color body color208 color234 "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" -# some simleys + +# some simleys and stuff color body color234 color214 "[;:]-*[)>(