I am currently working on creating a regular expression that will accept URLs and hostnames.
So, the following should be accepted:
google google.com www.google.com http://google.com http://www.google.com
However, the following should not be taken:
<xml> <html>
The expression I have received so far:
([a-zA-Z0-9])|((http(s)?://)?([\w-]+\.)+[\w-]+(/[\w- ;,./?%&=]*)?)
However, this part of the expression: ([a-zA-Z0-9])
matches <xml> and <html>
Are there any suggestions as to what I am missing here?
Fiona source share