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

DATEDIFF Question
First time post, and of course it is a help question.

I am using a WP plug-in to display prev

calculator
I can't figure out why this code doesn't work. No error messages. Page loads.

Code: <

date("now") prints out wrong date ?
Hi Guys
Anyone know why and how I can fix it ?

Help with PHP and checkboxes
I am posting this for a friend of mine, i wrote a small script for her to process her form data to a

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

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

Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot

InternetOpenUrl() Invalid cert
Hi all,

Does anyone know how to prevent calls to InternetOpenUrl() from failing with erro

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

Text file to .Dat file Conversion in PHP
Hi All,
Could anybody provide code for Text file to .Dat file Conversion in PHP.

Tha

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