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:


'/^[0-9A-F]{6}$/'

No comments posted yet

Your Answer:

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

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

delete comma
HI,

How to delete "," at the end of the string.
Code: $match = 2009/02/03/a2corr

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

Simple image grab script.
I was wondering if it was possible and if anyone knew how to make a simple php script that looks at

Consuming third party Payment Gateway API from Procedure.
Hi All,

First of all i would like to thank all the people of the oracle forum for providi

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

please help me... my password gets encrypted but not able to get in database
hai guys,
please help me... in the following function my password gets encrypted but no

animation progress while uploading files?
Hello, i have some website form to upload few files to server. i want to put some gif animation whi

Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 se

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