PHP REGEX
// Search Field:
$e = "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'KM0403580-70' for key 'PRIMARY'"
// Code:
$errorRegex = ereg("\:.([0-9]+)[a-zA-Z\s]+'([A-Z]*)'$", $e, $moError);
echo $moError[2] . " " . $moError[1];
Trying to get:
1062KM0403580-70
Any idea's what I'm doing wrong? I've been trying to find out for 4 hours now haha
eregis obsolete for a while now, please usepreg_matchinstead.