/ Published in: Regular Expression
                    
                                        
Matches any hex value (0123456789ABCDEF) preceded by the pound sign (#) of exactly 3 or 6 digits in length.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
/(#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})\b)/
Comments
 Subscribe to comments
                    Subscribe to comments
                
                