Regular Expression in php

Posted By: Damocles_

Regular Expression in php - 03/07/11 16:15

Hi, I dont get it with the reg expressions,
maybe someone has experience to define this (for php)

I need the reg-expression, to check if a String HAS ONLY
The Letters A-Z or a-z
Posted By: Damocles_

Re: Regular Expression in php - 03/07/11 16:25

Ok, I think I found it

if(preg_match("/^[a-zA-Z]+$/", $string_to_test))
Posted By: Joozey

Re: Regular Expression in php - 03/07/11 17:36

Never understood why they made a script that obscure.
Posted By: Damocles_

Re: Regular Expression in php - 03/07/11 17:51

Long Hair Linux Freaks with Metal-T-Shirts invented this probably



(The same type who set up a password-system that
requires so complicated and monthly changing passwords,
that people have to write it -openly- on a paper in the office to remember it)
© 2024 lite-C Forums