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

Regular expression tips or resources
Hello! I'm having some issues implementing the appropriate regex patter to eliminate unwanted charac

Something Non-Traditional. Can we solve?
I have an idea for an application here. It's mostly flash, but it couldn't work without a somewhat n

Hit counter updating once per IP - IP HIT COUNTER
I have a hit counter, for the amount of views on a tutorial.
It'll do the query and then do..

Is it possible to put an entire 500-page book in a database with PHP?
I am working on an intranet and I was wondering if its possible to code php with mysql to enter a fu

Else statement screws up all css
Does anyone know what goes wrong in the process with this php code?
This code seems to be causing

Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work

Which par

problems with script
I made a small script wich exchanges points in my website:


<?php
session_start

Please help with SMTP Authenticated PHP Email Form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

How to copy a part of a vector in a raw memory
Hi,

How can I copy a part of a vector into a memory:

1
2
3
4
5

Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so

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