How can i check that a user has input a url into the terminal for my application? Is there some sort of regex i can use?
I am getting the input from the terminal in Linux and storing it in a char str[100] variable.
EDIT*
I need to check that they can only enter a URL that actually exists, if that is possible.
I use this regular expression. It does not allow for the ?…. at the end though.
PS: I constructed it from an RFC