Preg_match question


Posted on 16th Feb 2014 07:03 pm by admin

I want to use preg_match to make sure a string is always 6 characters long and only contains 0-9 and the letters A-F.

I have this but it does not work:

Did you know?Explore Trending and Topic pages for more stories like this.

'/^[0-9A-F]{6}$/'
No comments posted yet

Your Answer:

Login to answer
254 Like 34 Dislike
Previous forums Next forums
Other forums

MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it need

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

Unexpected T_Variable ?
Hi all,
I dont really know what I am doing!! I know I'm doing something wrong, and I know its on

include problem
I have my root folder as:
Code: $root = $_SERVER["SITE_HTMLROOT"]; // the server root<

PHP template help
Ok, I don't know if anyone can help me but I am using PHP templates to make a site. I am a newbie an

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

controlling/creating accounts with privileges
hi all,
i'm trying to figure out how i can create/control account with privileges, for instance a

PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hope

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

Displaying Column Names
I have a question regarding the ability to show the column names from my table/query.
What I'm lo

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash