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

Need understanding of this bit of code
Code: <?php
// WHERE clause filters
$arrSQLFilters = array();

//

Problem with array max size.
Hi to everyone,
I've got a homework about filling a bidimensional array un spiral shape, I alre

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

[newb] Image hosting help.
Hey there, I'm new to php, I know some basics and i can code PWN, I'm only 14 but I'm interested in

How to have a log of all the status a VIM document had been ?
Hi guys,

I’m using SAP Invoice Management plugin and the /OPT/VIM_ANALYTICS transa

Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can

"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql

Ajax Error since Upgrading to 3.5
Ever since upgrading my site to .NET 3.5 (I needed LINQ), I've been getting this annoying error on o

Inserting 100x and 100y coordinates in mysql table - easy
Is there a way to insert this data into a mysql table named 'map' with the fields: 'x int 3' , 'y in

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

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