Possible Duplicate:
How can I get a regex to check that a string only contains alpha characters [a-z] or [A-Z]?
PHP: How to check if a string starts with a specified string?
I tried writing my own regex, but I suck at it.
#^(AJ\_)?.*#
The problem is, I will make a string like so: AJ______ClassNameBlahBlahBlah and my function returns TRUE. All I need is just AJ_ and text after it.
function isAnAJMClass($classname) {
     if (preg_match('#^(AJ\_)?.*#', $classname)) {
          return TRUE;
     } else {
         return FALSE;
     }
}
 
     
    