74 regular expressions found in this category!
     
    
    
	
	    
   Displaying page
of
 pages;
Items  to 
	
    
    
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    \[link="(?<link>((.|\n)*?))"\](?<text>((.|\n)*?))\[\/link\]  | 
                
                
                    | Description | 
                    This can be used in conjunction with the replace method to provide pseudo-code support without having to enable HTML. The replacement string (in ASP.NET, use RegExp.Replace(SourceString, RegularExpressionPattern, ReplacementString) is <a href="${link}">${text}</a>.  | 
                
                
                    | Matches | 
                    [link="http://www.yahoo.com"]Yahoo[/link]  | 
                
                
                    | Non-Matches | 
                    [link]http://www.yahoo.com[/link] | [link=http://www.yahoo.com]Yahoo[/link]  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Ryan S
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    <a\s*.*?href\s*=\s*['"](?!http:\/\/).*?>(.*?)<\/a>  | 
                
                
                    | Description | 
                    Finds all local links, but doesnt match on external links. 
Use replace with $1 to leave the link text but remove the link.  | 
                
                
                    | Matches | 
                    <a href='locallink.htm'>my local link</a> | <a title='click here' href="/a/local  | 
                
                
                    | Non-Matches | 
                    <a href='http://www.site.com/page.htm'>www.site.com</a> | <a href='http://www.site.co  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            james mountain
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ^[a-z]+([a-z0-9-]*[a-z0-9]+)?(\.([a-z]+([a-z0-9-]*[a-z0-9]+)?)+)*$  | 
                
                
                    | Description | 
                    A simple regex which should validate a domain name according to RFC 1035 
updated to match domain names with hyphens  | 
                
                
                    | Matches | 
                    www.domain.com | w123.d42omain.c43om | ww-w.d-omain.com  | 
                
                
                    | Non-Matches | 
                    1www.domain.com | www.1domain.com | www.domain.com-  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Tinus Norstved
                        
                     | 
                
            
        
        
	    
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~])*[^\.\,\)\(\s]$  | 
                
                
                    | Description | 
                    This Regex (can be used e.g. in PHP with eregi) will match any valid URL. Unlike the other exapmles here, it will NOT match a valid URL ending with a dot or bracket. This is important if you use this regex to find and "activate" Links in an Text  | 
                
                
                    | Matches | 
                    https://www.restrictd.com/~myhome/  | 
                
                
                    | Non-Matches | 
                    http://www.krumedia.com. | (http://www.krumedia.com) | http://www.krumedia.com,  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Michael Krutwig
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    (((ht|f)tp(s?):\/\/)|(www\.[^ \[\]\(\)\n\r\t]+)|(([012]?[0-9]{1,2}\.){3}[012]?[0-9]{1,2})\/)([^ \[\]\(\),;"'<>\n\r\t]+)([^\. \[\]\(\),;"'<>\n\r\t])|(([012]?[0-9]{1,2}\.){3}[012]?[0-9]{1,2})  | 
                
                
                    | Description | 
                    v2
A general purpose expresion to find url's (improved).
Add heads to first part, example:
((imap:|(ht|f)tp(s?):\/\/)|(www\.
to find url's like imap://www.com/, so ip's. No ipv6 (yet)  | 
                
                
                    | Matches | 
                    www.domain.com | http://www.blah.ru | https://192.168.0.2:80/users/~fname.lname/file.ext  | 
                
                
                    | Non-Matches | 
                    imap://.com  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            James Tikitiki
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ^([a-zA-Z].*|[1-9].*)\.(((j|J)(p|P)(g|G))|((g|G)(i|I)(f|F)))$  | 
                
                
                    | Description | 
                    Regular expression to limit types of files accepted. This example matches .jpg and .gif files only.  | 
                
                
                    | Matches | 
                    filename.jpg | FileName.JPG | filename.gif  | 
                
                
                    | Non-Matches | 
                    filename.png | filename.xxx | filename.bmp  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Ramon Hildreth
                        
                     | 
                
            
        
        
	    
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ^(?=[^&])(?:(?<scheme>[^:/?#]+):)?(?://(?<authority>[^/?#]*))?(?<path>[^?#]*)(?:\?(?<query>[^#]*))?(?:#(?<fragment>.*))?  | 
                
                
                    | Description | 
                    Use it for breaking-down a URI (URL, URN) reference into its main components: Scheme, Authority, Path, Query and Fragment.
This is not a simple match regular expression. so it not works to verify a URI. It returns 1 matching group for each URI component.
For example, for the following URI:
http://regexlib.com/REDetails.aspx?regexp_id=x#Details 
returns: scheme="http", authority="regexlib.com", path="/REDetails.aspx", query="regexp_id=x" and fragment="Details".
This is a W3C raccomandation (RFC 2396).  | 
                
                
                    | Matches | 
                    http://regexlib.com/REDetails.aspx?regexp_id=x#Details  | 
                
                
                    | Non-Matches | 
                    &  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Frederico Knabben
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?.xls  | 
                
                
                    | Description | 
                    This RegEx will help to validate a physical file path with a specific file extension (here xls)  | 
                
                
                    | Matches | 
                    E:\DyAGT\SD01A_specV2.xls  | 
                
                
                    | Non-Matches | 
                    E:\DyAGT\SD01A_specV2.txt  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            vinod kumar
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                     (mailto\:|(news|(ht|f)tp(s?))\://)(([^[:space:]]+)|([^[:space:]]+)( #([^#]+)#)?)   | 
                
                
                    | Description | 
                    this is a very little regex for use within a content management software.  links within textfields has not to be written in html.  the editor of the cms is instructed to use it like this:  1. mention spaces in front and behind the url  2. start url with http://, mailto://, ftp:// ...  3. use optional linktext within #linktext# (separated with single space)  4. if there is no linktext the url/email will show up as linktext  5. avoid url with spaces in filename (use %20 urldecode)   replace pattern (space in front):   <a href="\\1\\3\\4" target="_blank">\\3\\6</a>  | 
                
                
                    | Matches | 
                     http://www.domain.com  |  http://www.domain.com/index%20page.htm #linktext#  |  mailto://user@domai  | 
                
                
                    | Non-Matches | 
                    <a href="http://www.domain.com">real html link</a> | http://www.without_space_  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Martin Schwedes
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ^\[assembly: AssemblyVersion\(\"([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)  | 
                
                
                    | Description | 
                    using match.Result("$1.$2.$3.$4") 
will return the assembly version of a given c# AssemblyInfo.cs file  | 
                
                
                    | Matches | 
                    [assembly: AssemblyVersion("1.0.5.5")] | [assembly: AssemblyVersion("1.0.3.5")]|  | 
                
                
                    | Non-Matches | 
                    [assembly: AssemblyVersion("1.0.*")]  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Yosi Taguri
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ((http\://|https\://|ftp\://)|(www.))+(([a-zA-Z0-9\.-]+\.[a-zA-Z]{2,4})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(/[a-zA-Z0-9%:/-_\?\.'~]*)?  | 
                
                
                    | Description | 
                    This RE matches the web links which begin http://, ftp://, https:// or www. 
You can edit this disadvantage easy...  | 
                
                
                    | Matches | 
                    www.diskusneforum.sk | http://diskusneforum.sk | ftp://23.45.267.189/  | 
                
                
                    | Non-Matches | 
                    diskusneforum.sk | localhost  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Martin Ille
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ^((\d|\d\d|[0-1]\d\d|2[0-4]\d|25[0-5])\.(\d|\d\d|[0-1]\d\d|2[0-4]\d|25[0-5])\.(\d|\d\d|[0-1]\d\d|2[0-4]\d|25[0-5])\.(\d|\d\d|[0-1]\d\d|2[0-4]\d|25[0-5]))$
  | 
                
                
                    | Description | 
                    Matches valids TCP/IP-Adresses  | 
                
                
                    | Matches | 
                    1.198.0.1 | 100.10.0.1 | 200.200.123.123  | 
                
                
                    | Non-Matches | 
                    ..12.23 | a.23.345 | 400.500.300.300  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Karsten Sosna
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    ([A-Z]:\\[^/:\*\?<>\|]+\.\w{2,6})|(\\{2}[^/:\*\?<>\|]+\.\w{2,6})  | 
                
                
                    | Description | 
                    This regular expression pattern can be used to check the validity of paths for file upload controls. The uploaded file can be either stored locally or accessible through UNC. It cannot contain illegal characters for the windows OS - that may be supported e.g. on Mac OS – and cannot be a URL (Yes, as weird as it may seem, some users enter URLs in the file upload box, even though there is a browse button...)  | 
                
                
                    | Matches | 
                    C:\temp\this allows spaces\web.config | \\Andromeda\share\file name.123  | 
                
                
                    | Non-Matches | 
                    tz:\temp\ fi*le?na:m<e>.doc | \\Andromeda\share\filename.a  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Alban Schmid
                        
                     | 
                
            
        
            
                
                    | Title | 
                    
                        Test
                        Details
                        
                            Pattern Title
                        
                     | 
                
                
                    | Expression | 
                    href\s*=\s*(?:(?:\"(?<url>[^\"]*)\")|(?<url>[^\s*] ))>(?<title>[^<]+)</\w>  | 
                
                
                    | Description | 
                    finds the url and url description for all links in a given text.  | 
                
                
                    | Matches | 
                    <td bgcolor="#ffffff" class="small">&nbsp;<A HREF="    http://  | 
                
                
                    | Non-Matches | 
                    <td bgcolor="#ffffff" class="small">&nbsp;<A HREF http://www.thepla  | 
                
                
                    | Author | 
                    
                        Rating:
                        
Not yet rated.
                        
                            Matt Bruce
                        
                     | 
                
            
        
	
	    
   Displaying page
of
 pages;
Items  to