RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Color Hex
Expression
^#(\d{6})|^#([A-F]{6})|^#([A-F]|[0-9]){6}
Description
Hexadecimal color values to validate the system must begin with a # symbol, which can be combination of numbers and letters AF, but the letters must be uppercase.
Matches
#000000|#FFFFFF|#000FFF|#FFF000|#A1B2C3
Non-Matches
#ffffff|#ABC|#123|#AJKSDD|#a1b2c3|abcdef|123456
Author Rating: The rating for this expression. Netken
Source Netken
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: modification
Name: BH
Date: 10/15/2014 3:35:41 PM
Comment:
i added some updates to make it better in my opinion ^#*((\d{6})|([A-F]{6})|([A-F]|[0-9]){6})$


Title: modification
Name: BH
Date: 10/15/2014 3:35:34 PM
Comment:
i added some updates to make it better in my opinion ^#*((\d{6})|([A-F]{6})|([A-F]|[0-9]){6})$


Title: Perfect
Name: Altaf
Date: 7/22/2014 7:53:51 AM
Comment:
It worked as I required.


Title: color verification
Name: bill
Date: 4/15/2010 3:10:46 AM
Comment:
Very good. Thank you


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials