Forum Moderators: coopster
$regex_a = '/^([0-9a-f]{1,2}){3}$/';
Somehow this matches 3 or 6 characters in length which is what I want it to be able to match.
There are two other things I want to add support for...
1.) Exactly 'transparent' (and I will create a very similar copy for background-image support to support exactly 'none'.
2.) I'd like to also allow {0} in length however when I add the solid pipe(s) it breaks what I do have working!
Suggestions please?
- John
$regex_a = '/^(([a-f0-9]{3})¦([a-f0-9]{6}))$/';
This works great! Here is what I'm going with (broken pipes reminder and the image regex only matches the file's number as the extension is added elsewhere)...
$regex_color = '/^(([0-9a-f]{1,2}){3}¦transparent)?$/';
$regex_image = '/^(([0-9a-f]{1,2}){3}¦none)?$/';