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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find HTML Color
Expression
^#[\dA-Fa-f]{3}(?:[\dA-Fa-f]{3}[\dA-Fa-f]{0,2})?$
Description
matches # + 3 hex numbers + optional 3 more hex numbers and 2 more hex numbers for alpha PS: you have got to try RegexBuddy it's a very cool tool that helps realy http://www.regexbuddy.com
Matches
#fff | #123456 | #12345678 | #1f35cc
Non-Matches
#1234 | #0 | #123456789
Author Rating: Not yet rated. ASM™
Source
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

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