From a04beb5ea91ceac2d6a06f344527ed4d1c8e6fd0 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 20 Aug 2023 14:05:08 +0200 Subject: Removed useless comment, added ftp to urlgrep --- urlgrep | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/urlgrep b/urlgrep index 665f19a..49afac6 100755 --- a/urlgrep +++ b/urlgrep @@ -1,12 +1,8 @@ #!/bin/sh -# Find all url in stdin, print them newline-separated to stdout +# Find all URLs in stdin, print them newline-separated to stdout -# Old regex (PCRE), kept it for later review: -# reg='(((http|https|ftp)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]' -# grep -Po "$reg" - -protocols='http|https|ftp|gemini|mailto' +protocols='http|https|ftp|sftp|gemini|mailto' valid_chars="][a-zA-Z0-9_~/?#@!$&'()*+=.,;:-" regex="(($protocols):|www\.)[$valid_chars]+" -- cgit v1.3