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

PHP & Images [Resize, Crop, Save]
Hey! Well I have a little dilema, hoping I could find some guidance.

I have a CMS and on the

Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and

Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the goin

Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret

How to make a mail Form secure?
I want to create an email Form on my web site. How can I make the Form secure so the submitted info

pop3 and fsockopen
So I am able to connect to the pop3 server, log in, and check how many messages there are. I am hav

why this query can delete duplicates ?
why this query can delete duplicates ? Anybody can give me the detailed explanation ?

Tha

how to export excel file in same server
My first post - php newbie, so appreciate your support.

I'm currently using headers to save w

Email Script does not reach destination
Hey Guys look at this code snippet :
Code:
//read a line from the file

$myFile = "

PDO returns erroneous columns from within pdt
Hi All,

This is a truly weird behavior:
When using a simple pdo fetch, erroneous columns a

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