I try to write regex to match URL in Java. I found the regex on the internet and it works fine in the online regex editor. When i try to run it on the eclipse, it gives following error : Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )
(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?
How can i solve this problem?
Thanks in advance.