Extracting Domain Labels from URLs
^.*:\/\/(([a-z\d][-a-z\d]*[a-z\d]\.)*[a-z][-a-z\d]*[a-z]).*$
Example:
Extracting the Port from a URL
^.*:(\d{1,}).*$
Example:
Extracting the Path from a URL
.*:\/\/[^\/]+\/([^?\s<>#""]+).*
Example:
Extracting Query Strings from URLs
.*\?([^<>#""]+)
Example:
Replacing URLs with Links
((ht|f)tps?://([a-z\d][-a-z\d]*[a-z\d].)*[a-z][-a-z\d]*[a-z](:\d{1,})?(/[^?<>#"\s]+)?(\?[^<>#"\s]+)?)
<a href=\"$1\"> $1</a>
Example:
Extracting the Drive Letter
^(?<drive>[a-z]):\\?
Example:
Extracting UNC Hostnames
\\\\([^~!@#$^&()=+\[\]{}\\|;:',<>\/?]+).*
Example:
Extracting Filenames from Paths
^[^\\]+((\\([^\\\/:*?\"<>|.][^\\\/:*?\"<>|]*))+)
Example:
Extracting Extensions from Filenames
[^\\]+\\[^.\\\/:*?\"<>|]+\.([^\\\/:*?\"<>|]+)
Example: