aboutsummaryrefslogtreecommitdiffstats
path: root/fzf-url.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fzf-url.sh')
-rwxr-xr-xfzf-url.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/fzf-url.sh b/fzf-url.sh
index 04a6060..4833d72 100755
--- a/fzf-url.sh
+++ b/fzf-url.sh
@@ -16,9 +16,9 @@ elif hash open &>/dev/null; then
fi
content="$(tmux capture-pane -J -p)"
-urls=($(echo "$content" |grep -oE '\b(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]'))
-wwws=($(echo "$content" |grep -oE 'www(\.[^\.]+)+' | sed 's/\(.*\)/http:\/\/\1/'))
-ips=($(echo "$content" |grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9].*)?' | sed 's/\(.*\)/http:\/\/\1/'))
+urls=($(echo "$content" |grep -oE '(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]'))
+wwws=($(echo "$content" |grep -oE '(([a-zA-Z](-?[a-zA-Z0-9])*)\.)*[a-zA-Z](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}(/\S+)*' |sed 's/^\(.*\)$/http:\/\/\1/'))
+ips=($(echo "$content" |grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9]{1,5})?(/\S+)*' |sed 's/^\(.*\)$/http:\/\/\1/'))
merge() {
for item in "$@" ; do