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

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

Oracle Text CTX_DOC.snippet slow
I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following O

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

Simpler method of getting variables from mysql
Hi Guys,

I'm trying to streamline my CMS's code and as I was writing a new page it occured to

Working with Global Variables
hi, I'm not really sure why the following code is returning a "Call to a member function getBan

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

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