I have to Validate a user input Color coding that has to accept HEX values only, i.e. it has to have '#CCFF00' as e.g.
1st Character as # followed by HEX Values between 0-9 and A-F only 6 Chars.
I tried using this, didn't work but..
if (! eregi("#([0-9][A-F]{6})", $input_color)) {
echo "Error : in Color Codings" ;
}
Please tell me where am i going wrong. i always tend to error in Pattern matching. it is so tricky at times.
Thanks in Advance.
Bijal .