Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
(?=^.{1,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-]{1,63}\.?)+(?:[a-zA-Z]{2,})$) |
Description |
Validates MS FQDNs. 1) Entire fqdn less than 255 chars. 2) Host and domain names may contain an underscore. 3) 1st char can be a number. 4) No part can be all numbers. 5) Allows any TLD
Works in C#. Based on Remi Sabourin's regex |
Matches |
host.domain.com | _host.domain.com | 1host-2._ldap.domain.com |
Non-Matches |
33.domain.com | host..com | this_really_long._fully_qualified_domain_name._contains_257_characters_w |
Author |
Rating:
Not yet rated.
Scott Mulcahy
|
Title |
Test
Details
FQDN Validation
|
Expression |
(?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?<!-)\.?)+(?:[a-zA-Z]{2,})$) |
Description |
Validates MS FQDNs. 1) Entire fqdn less than 255 chars. 2) Host and domain names may contain an underscore. 3) 1st char can be a number. 4) No part can be all numbers. 5) Allows any TLD Works in C#. Based on Remi Sabourin's regex. Based on anonymous feedback I've corrected it to no longer match domains that start or end with a hyphen. |
Matches |
host.domain.com | _host.domain.com | 1host-2._ldap.domain.com |
Non-Matches |
33.domain.com | host..com | a-.com |
Author |
Rating:
Scott Mulcahy
|
Title |
Test
Details
RFC2822 Compliant Email Check
|
Expression |
^(([-\w$%&'*+\/=?^_`{|}~.]+)@(([-a-zA-Z0-9_]+\.)*)([-a-zA-Z0-9]+\.)([a-zA-Z0-9]{2,7}))?$ |
Description |
RFC2822 compliant email matching regex that doesn't assume TLDs are set for all time. Clearly this means that someone could get a 2 letter country code wrong, but since no TLD is set in stone, I prefer to match future possibilities as well. This also conforms to what traditional DNS can do w/r/t hostnames and domain names. |
Matches |
|
Non-Matches |
aoluser1 |
Author |
Rating:
David Kearns
|
Title |
Test
Details
Full Windows Folder Path
|
Expression |
^([A-Za-z]:|\\{2}([-\w]+|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\\(([^"*/:?|<>\\,;[\]+=.\x00-\x20]|\.[.\x20]*[^"*/:?|<>\\,;[\]+=.\x00-\x20])([^"*/:?|<>\\,;[\]+=\x00-\x1F]*[^"*/:?|<>\\,;[\]+=\x00-\x20])?))\\([^"*/:?|<>\\.\x00-\x20]([^"*/:?|<>\\\x00-\x1F]*[^"*/:?|<>\\.\x00-\x20])?\\)*$ |
Description |
Validates the format of a Windows folder path ending with a backslash using the drive path or Universal Naming Convention (UNC)--without using lookaround.<br><br>Windows folder components: <br>(I) The drive can only be one letter. <br>(II) The server name (1) can only contain letters, numbers, and hyphens. However, Windows does allow underscores--which aren’t standard characters in the Request for Comments (RFC) 1035 standard--for networks using the Microsoft DNS Server. (Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;222823) or (2) can be an IP address <br>(III) The share name (also called the service name) (1) Can contain any character except ones with an ASCII code in the range of 0 (x00) through 31 (x1F) and the following: " * / : ? | < > \ , ; [ ] + = (Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;236388) (2) Can begin or end with a period, but cannot contain all periods (3) Cannot begin or end with a space (4) There must be at least one character that is not a space or period if the rest of the share name contains periods and spaces or just periods. <br>(IV) The folder and subfolder names (without the drive, share, or server name) (1) Can contain any character except ones with an ASCII code in the range of 0 (x00) through 31 (x1F) and the following: " * / : ? | < > \ (Reference: http://msdn2.microsoft.com/en-us/library/aa365247.aspx) (2) Cannot begin or end with a space or period. |
Matches |
d:\, \\Dpk\T c\, E:\reference\h101\, \\be\projects$\Wield\Rff\, \\70.60.44.88\T d\SPC2\ |
Non-Matches |
j:ohn\, \\Dpk\, G:\GD, \\cae\.. ..\, \\70.60.44\T d\SPC2\ |
Author |
Rating:
John Marshall
|
Title |
Test
Details
Full Windows Folder UNC Path
|
Expression |
^\\{2}[-\w]+\\(([^"*/:?|<>\\,;[\]+=.\x00-\x20]|\.[.\x20]*[^"*/:?|<>\\,;[\]+=.\x00-\x20])([^"*/:?|<>\\,;[\]+=\x00-\x1F]*[^"*/:?|<>\\,;[\]+=\x00-\x20])?)\\([^"*/:?|<>\\.\x00-\x20]([^"*/:?|<>\\\x00-\x1F]*[^"*/:?|<>\\.\x00-\x20])?\\)*$ |
Description |
Validates the format of a Windows folder path ending with a backslash using the Universal Naming Convention (UNC)--without using lookaround.<br><br>Windows UNC folder components: <br>(I) The server name can only contain letters, numbers, and hyphens. However, Windows does allow underscores--which aren’t standard characters in the Request for Comments (RFC) 1035 standard--for networks using the Microsoft DNS Server. (Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;222823) <br>(II) The share name (also called the service name) (1) Can contain any character except ones with an ASCII code in the range of 0 (x00) through 31 (x1F) and the following: " * / : ? | < > \ , ; [ ] + = (Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;236388) (2) Can begin or end with a period, but cannot contain all periods (3) Cannot begin or end with a space (4) There must be at least one character that is not a space or period if the rest of the share name contains periods and spaces or just periods. <br>(III) The folder and subfolder names (without the share and server names) (1) Can contain any character except ones with an ASCII code in the range of 0 (x00) through 31 (x1F) and the following: " * / : ? | < > \ (Reference: http://msdn2.microsoft.com/en-us/library/aa365247.aspx) (2) Cannot begin or end with a space or period. |
Matches |
\\Dpk\T c\, \\be\projects$\Wield\Rff\ |
Non-Matches |
j:ohn\, \\Dpk\, G:\GD, \\cae\.. ..\, d:\, E:\reference\h101\ |
Author |
Rating:
John Marshall
|
Title |
Test
Details
FQDN for DNS configuration tool
|
Expression |
^(?=^.{1,254}$)(^(?:(?!\.|-)([a-z0-9\-\*]{1,63}|([a-z0-9\-]{1,62}[a-z0-9]))\.)+(?:[a-z]{2,})$)$ |
Description |
This regex matches FQDNs plus domains starting with an or containing asterisk. This is usefull for DNS configuration tools where you might have domains like *.domain.de or 12.152.80.in-addr.arpa. |
Matches |
12.152.80.in-addr.arpa | *.domain.de | test.de |
Non-Matches |
test | test. | -.de |
Author |
Rating:
Not yet rated.
Andreas Burger
|
Title |
Test
Details
URI
|
Expression |
(?ix-ms:[\wöäüß]{2,}[\.]?)* |
Description |
Matching any possible server DNS entries |
Matches |
www.domain.com,bit.li |
Non-Matches |
ww..domain.com,bit..li |
Author |
Rating:
Not yet rated.
getmd5.de
|
Title |
Test
Details
from:[email protected]
|
Expression |
\[\x01-\x7f])*"\x20*)*(?<angle><))?((?!\.)(?>\.?[a-zA-Z\d!#$%&'*+\-/=?^_`{|}~]+)+|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*")@(((?!-)[a-zA-Z\d\-]+(?<!-)\.)+[a-zA-Z]{2,}|\[(((?(?<!\[)\.)(25[0-5]|2[0-4]\d|[01]?\d?\d)){4}|[a-zA-Z\d\-]*[a-zA-Z\d]:((?=[\x01-\x7f])[^\\\[\]]|\\[\x01-\x7f])+)\])(?(angle)>)$ |
Description |
DNS record expression berhanebahta4@gmail |
Matches |
/// |
Non-Matches |
/// |
Author |
Rating:
Not yet rated.
Berhane Bahlibi
|
Displaying page
of
pages;
Items to