DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Regex For Hex Color Validation

08.07.2011
| 4375 views |
  • submit to reddit
        Regex:
/^#?+[0-9a-f]{3}(?:[0-9a-f]{3})?$/i

<i><a href="http://ncalculators.com/investment/fixed-deposit-calculator.htm">Fixed Deposit Calculator</a></i>