I must admit I've never gotten used to using regex, however recently I ran into a problem where the work around would've been more of a pain than using regex. I need to be able to match anything that follows the following pattern at the beginning of a string:
{any_url_safe_word} +( "/http://" || "/https://" || "www.") + {any word}.
So the following should match:
cars/http://google.com#testcars/https://google.com#testcars/www.google.com#test
The follwing shouldn't match:
cars/httdp://google.com#testcars/http:/google.com#test
What I tried so far is: ^[\w]{1,500}\/[(http\:\/\/)|(https:\/\/])|([www\.])]{0,50}, but that matches cars/http from cars/httpd://google.com.
