Ok, I need a hand. I can't seem to get the regular expression to work quite right. I need a regular expression to match this: www.something.com or http://www.something.com Along with that I need it to match if there is any trailing subfolders so: www.something.com/here/ or http://www.something.com/here/ Make sense? Thanks in advance to the person that know more about regular expressions than me.
I saw many examples for this! Wait let me google. Back. Use this at google: url php regular expression and you will find many
Thanks for answering. I found a solution over at: http://regexlib.com The regular expression that appears to work so far is: (http:[\/][\/]|www.)([a-z]|[A-Z]|[0-9]|[\/.]|[~])*