You could try the below grep command which uses a positive lookahead based regex, $ echo "fwef-$*nVrtmp://Ggdggragravrv.com/lolwtf.mp5skill0rz%%&:/getr4kt..Glub" | grep -oP 'rtmp.*?(?=\.\.)' rtmp://Ggdggragravrv.com/lolwtf.mp5skill0rz%%&:/getr4kt ...
Wow. ngrep's command-line syntax really is a greasy hack. The ngrep man page says: ngrep {various flags} <match expression> <bpf filter> without indicating how ngrep manages to tell what's part of the "match expression" and what's part of the "bpf filter". The way it determines that is by: taking the...