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

PHP Captcha Error help - replace the "die" command
Hi All,

I am after a bit of help with a Captcha spam protection box.

The site gave me

Is there a more efficient way to code this than what I have?
I have three associative arrays.

$combinedSettings
$userSettings
$defaultSettings

Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email

Set Categories
I am creating a submission form for somebody to come in and submit products. These products are sep

Problem with Subscreen
Dear Experts ,
I am facing a problem with the subscreens. My senario is as follows :

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

use an array from 1 class in a second class
I have a class that adds data to an array

Then I have a second class and I need to check if t

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

Referential Integrity problem when inserting into 2 tables at same time
Hello Everyone,

Im relativity new to PHP and MySQL and i have come up against a problem. i h

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