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

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

xml
<?php

echo "<h1>XML Articles</h1>";

$home

Exporting new records
Trying to figure out the best way to set this up.

People register my site.

Their prof

UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

MySQL query problem
When I try to run the following piece of code, I get this error:
QuoteWarning: mysql_query(): sup

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

Multiple PHP errors when clicking a link..and..removing a ghost..
Hi - I have 2 problems with a new website - homeswapvacations.com, which I need help solving.

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

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