RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 3
Title Test Details Host name
Expression
[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*(?:\.[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)*
Description
Multi-part host name validator, RFC-compliant but does not validate length of components or overall length
Matches
localhost www.example.com host-1234.example.com
Non-Matches
localhost. -1234.example.com
Author Rating: The rating for this expression. Kevin Dean
Title Test Details HTTP(S) URL
Expression
https?://[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*(?:\.[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)*/\S*
Description
HTTP(S) URL validator with embededded multi-part host name validator, RFC-compliant but does not validate length of components or overall length. Path portion after host name is free-form and will need refinement if you want to validate it.
Matches
http://www.example.com/ https://localhost/whatever
Non-Matches
http://www.example.com ftp://localhost/whatever
Author Rating: Not yet rated. Kevin Dean
Title Test Details Email address
Expression
[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+(?:\.[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+)*@[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*(?:\.[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)*
Description
Email address validator with embededded multi-part host name validator, RFC-compliant but does not validate length of components or overall length.
Matches
mike@localhost sue@example.com
Non-Matches
mike @localhost sue.@example.com
Author Rating: Not yet rated. Kevin Dean
   Displaying page 1 of 1 pages; Items 1 to 3

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials