Displaying page
of
 pages;
Items  to 
    
    
            
                
                    | Title | Test
                        Details
                        
                        
                            Accurate IP address verification | 
                
                    | Expression | 
                            ((0|1[0-9]{0,2}|2[0-9]?|2[0-4][0-9]|25[0-5]|[3-9][0-9]?)\.){3}(0|1[0-9]{0,2}|2[0-9]?|2[0-4][0-9]|25[0-5]|[3-9][0-9]?)
                         | 
                
                    | Description | Accurate IP address verification...
Each numeric part of an IP address must be between 0 and 255. All patterns I have seen on the net cover this range but they allow leading zeros. The valid cases are:
* 0
* 1, 10-19 and 100-199 aka 1[0-9]{0,2}
* 2 and 20-29 aka 2[0-9]?
* 200-249 aka 2[0-4][0-9]
* 250-255 aka 25[0-5]
* 3-9 and 30-99 aka [3-9][0-9]? | 
                
                    | Matches | 10.0.0.0 | 195.167.1.119 | 255.255.255.255 | 
                
                    | Non-Matches | 010.0.0.0 | 195.167.01.119 | 256.20.55.23 | 
                
                    | Author | Rating:  Vassilis Petroulias | 
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            Australian postal code verification | 
                
                    | Expression | 
                            (0[289][0-9]{2})|([1345689][0-9]{3})|(2[0-8][0-9]{2})|(290[0-9])|(291[0-4])|(7[0-4][0-9]{2})|(7[8-9][0-9]{2})
                         | 
                
                    | Description | Accurate Australian postal code verification.
Australia has 4-digit numeric postal codes with the following state based specific ranges. 
ACT: 0200-0299 and 2600-2639. 
NSW: 1000-1999, 2000-2599 and 2640-2914. 
NT: 0900-0999 and 0800-0899. 
QLD: 9000-9999  and 4000-4999. 
SA: 5000-5999. 
TAS: 7800-7999  and 7000-7499. 
VIC: 8000-8999 and 3000-3999. 
WA: 6800-6999 and 6000-6799. | 
                
                    | Matches | 0200 | 7312 | 2415 | 
                
                    | Non-Matches | 0300 | 7612 | 2915 | 
                
                    | Author | Rating:  Vassilis Petroulias | 
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            Canadian postal code format verification | 
                
                    | Expression | 
                            ([ABCEGHJKLMNPRSTVXY][0-9][ABCEGHJKLMNPRSTVWXYZ])\ ?([0-9][ABCEGHJKLMNPRSTVWXYZ][0-9])
                         | 
                
                    | Description | Accurate Canadian postal code format verification.
The format of a Canadian postal code is LDL DLD where L are alpha characters and D are numeric digits. But there are some exceptions. The letters D, F, I, O, Q and U never appear in a postal code because of their visual similarity to 0, E, 1, 0, 0, and V respectively. In addition to avoiding the six "forbidden" letters W and Z also do not appear as the first letter of a postal code (at least not at present). | 
                
                    | Matches | M1R 4B0 | L0R 1B1 | L0R1B9 | 
                
                    | Non-Matches | W1R 4B0 | L0R 1D1 | LOR1B9 | 
                
                    | Author | Rating:  Vassilis Petroulias | 
            
        
            
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            German postal code verification (UPDATED) | 
                
                    | Expression | 
                            ((0[13-7]|1[1235789]|[257][0-9]|3[0-35-9]|4[0124-9]|6[013-79]|8[0124-9]|9[0-5789])[0-9]{3}|10([2-9][0-9]{2}|1([2-9][0-9]|11[5-9]))|14([01][0-9]{2}|715))
                         | 
                
                    | Description | Accurate German postal code verification. 
Germany has 5-digit numeric postal codes. The expression evaluates a postal code within state based specific ranges. | 
                
                    | Matches | 01125 | 
                
                    | Non-Matches | 34125 | 
                
                    | Author | Rating:  Vassilis Petroulias | 
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            UK postal code format verification | 
                
                    | Expression | 
                            (([A-Z]{1,2}[0-9][0-9A-Z]?)\ ([0-9][A-Z]{2}))|(GIR\ 0AA)
                         | 
                
                    | Description | Accurate UK postal code format verification.
UK postal codes have two parts. The right part is formatted as DLL (L:letter D:digit) and the left part has six alternative formats: LD, LDL, LDD, LLD, LLDL and LLDD. There is only one exception to these formats: GIR 0AA. | 
                
                    | Matches | M2 5BQ | EC1A 1HQ | GIR 0AA | 
                
                    | Non-Matches | M2 BQ5 | E31A 1HQ | GIR0AA | 
                
                    | Author | Rating:  Vassilis Petroulias | 
            
        
            
        
            
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            VAT Numbers format verification (GB) | 
                
                    | Expression | 
                            (GB-?)?([1-9][0-9]{2}\ ?[0-9]{4}\ ?[0-9]{2})|([1-9][0-9]{2}\ ?[0-9]{4}\ ?[0-9]{2}\ ?[0-9]{3})|((GD|HA)[0-9]{3})
                         | 
                
                    | Description | VAT Numbers format verification (United Kingdom) with support for optional member state definition.  
 | 
                
                    | Matches | GB123 1234 12 | GBGD123 | 123 1234 12 123 | 
                
                    | Non-Matches | GB123123412 | GBGD1234 | 023 1234 12 123 | 
                
                    | Author | Rating:  Vassilis Petroulias | 
            
        
            
        
            
        
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            Valid Base64 string | 
                
                    | Expression | 
                            (([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?){1}
                         | 
                
                    | Description | The expression evaluates a Base64 string as a sequence of 4-byte blocks with a possible tail of 2 or 3-byte block with valid padding.
 | 
                
                    | Matches | AAAAAA== | 
                
                    | Non-Matches | AAAAAA | 
                
                    | Author | Rating:
                            
Not yet rated.
                        
                            Vassilis Petroulias | 
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            HTML encoded characters as dec or hex values | 
                
                    | Expression | 
                            &#([0-9]{1,5}|x[0-9a-fA-F]{1,4});
                         | 
                
                    | Description | Find all html encoded  characters as dec &#[0-9]{1,5}; or hex &#x[0-9a-fA-F]{1,4}; values. Remember to remove "amp;" which is used for making this post possible. | 
                
                    | Matches |   |   | 
                
                    | Non-Matches |   | 
                
                    | Author | Rating:
                            
Not yet rated.
                        
                            Vassilis Petroulias | 
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            US and Canada Phone numbers (all variations) | 
                
                    | Expression | 
                            ((\+?1)(\ \.-)?)?\([2-9][0-9]{2}|\([2-9][0-9]{2}\))(\ \.-)?[0-9]{3}(\ \.-)?[0-9]{4}
                         | 
                
                    | Description | US and Canada phones in any usual variation (area code in parenthesis, spaces or dots) including the international notation +1 | 
                
                    | Matches | +1 212 555 6666 | (212) 555 6666 | 212-555-666 | 212 5556666 | 
                
                    | Non-Matches | 212 555 666 | 
                
                    | Author | Rating:
                            
Not yet rated.
                        
                            Vassilis Petroulias | 
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            Month names (english) | 
                
                    | Expression | 
                            (Jan(uary)?|Feb(ruary)?|Mar(ch)?|Apr(il)?|May|Jun(e)?|Jul(y)?|Aug(ust)?|Sep(tember)?|Oct(ober)?|(Nov|Dec)(ember)?)
                         | 
                
                    | Description | The expression matches any month name (english) in short or full style. Use it with case insensitive mode in your date matching expressions. | 
                
                    | Matches | Jan | April | 
                
                    | Non-Matches | Febr | 
                
                    | Author | Rating:  Vassilis Petroulias | 
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            Weekday names (english) | 
                
                    | Expression | 
                            (Mo(n(day)?)?|Tu(e(sday)?)?|We(d(nesday)?)?|Th(u(rsday)?)?|Fr(i(day)?)?|Sa(t(urday)?)?|Su(n(day)?)?)
                         | 
                
                    | Description | The expression matches any weekday name (english) in short (2 or 3 characters) or full style. Use it with case insensitive mode in your date matching expressions. | 
                
                    | Matches | Mo | Sun | 
                
                    | Non-Matches | Any | 
                
                    | Author | Rating:
                            
Not yet rated.
                        
                            Vassilis Petroulias | 
            
        
            
                
                    | Title | Test
                        Details
                        
                        
                            US (5 or 9 digits) Zip Codes with grouping | 
                
                    | Expression | 
                            (?<group5>[0-9]{5})-?(?<group4>[0-9]{4})?
                         | 
                
                    | Description | Match 5-digit or 9-digit US zip codes with grouped results. Remember to replace < with open tag char and > with close tag char | 
                
                    | Matches | 12345 | 12345-6789 | 123456789 | 
                
                    | Non-Matches | 12345 6789 | 
                
                    | Author | Rating:
                            
Not yet rated.
                        
                            Vassilis Petroulias | 
            
        
    
        
        
   Displaying page
of
 pages;
Items  to