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

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

Code doesn't print what i wanted it too. Please help!
Hi there,

I wrote this code to mae it so that in the form before it that the user said their

Passing vars to the DB
I have 3 small testing tables:

ID TYPE
1 pepperoni
2 C. bacon
3 taco

ID TY

Check if another session of the page is running?
I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to

Interpret Order
Hello all,

I'm wondering if I have this:

Code: $switch = array(
'one' =>

Standard DES encryption script?
Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt i

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

Creating a custom API
I'm creating a site, and I need to create a basic API. Unfortunately I have no idea where to start.

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Warning: Cannot modify header information - headers already sent by (output sta
Warning: Cannot modify header information - headers already sent by (output started at /home/praylif

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