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

Handling text changed in text box control using Ajax
I need to create a web form with a text box control. When someone types text into the textbox I nee

Problem with the Update command used with a sqldataadapter
I'm connected to a database on an SQL Server and I'm using a sqldataadapter, sqlconnection, sqldatas

Optimize Code
Just started getting into the use of cookies. The following code will redirect users to a set URL s

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav

generate seo frienly url from a text like wordpress
Convert: "åäö" to "aao", "space" to "-", "!?&q

Last Weeks sDate and eDate.
sDate - Start Date
eDate - End Date

I need to pull two dates for "Last Week" whi

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

Problem executing bash script using shell_exec
Hi there,
I created a bash script file using following code to convert doc documents to pdf using

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