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

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and tim

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..

I need to pull data for clien

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

Do not allow posting of whitespace
Currently the script below works if the user does not type a name/message, but if i create a whitesp

Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named

Output Buffering question
Hi all,

I've been trying to wrap my head around output buffering. So far I've found tons of

Insert to MySQL inside foreach
Hey.
I am parsing some html, and putting inside an html db.
I need to create a randomized inte

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