I wrote a grep command in order to grep URLs which starts with http/https from file.
I used a regex which is:
(https?:\/\/)([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?
For the string http://google.com/hello/from/here
, I wanted to get the full URL.
However, when I ran the script the output was http://google.com/
.
How can I force the grep command to find everthing between each slashes (until the end of the line or the first space)?
Thanks in advance.