summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-08-15 07:55:26 -0400
committerLuke Smith <luke@lukesmith.xyz>2022-08-15 07:55:26 -0400
commit2e2d560516765e301e0425c2fbf783825334f9a1 (patch)
treeb48ee57b212913c20432291ed705e15b0810d7c1
parent3144a61c180b678f6b1c23f06e4b434090199fcb (diff)
colons in urls
-rwxr-xr-xst-urlhandler2
1 files changed, 1 insertions, 1 deletions
diff --git a/st-urlhandler b/st-urlhandler
index e2a62f4..0eb4586 100755
--- a/st-urlhandler
+++ b/st-urlhandler
@@ -1,6 +1,6 @@
#!/bin/sh
-urlregex="(((http|https|gopher|gemini|ftp|ftps|git)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./@$&%?$\#=_~-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)"
+urlregex="(((http|https|gopher|gemini|ftp|ftps|git)://|www\\.)[a-zA-Z0-9.]*[:;a-zA-Z0-9./+@$&%?$\#=_~-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)"
urls="$(sed 's/.*│//g' | tr -d '\n' | # First remove linebreaks and mutt sidebars:
grep -aEo "$urlregex" | # grep only urls as defined above.