I will like to replace any numeric character from the 12th position of variable $key
with an empty string: $key
variable has 12 characters + incremented numeric characters. For example:
IODN4YFK5XKV1
GYDN4YFK5XKV2
P3FU4YFK5XKV3
Bellow is my current line of php code:
$data = ereg_replace( "[0-9]+$", "", $_REQUEST['code'] );
Problem: If my $key = HXGE1SR9OWM428
, the last 3 digits (428) will be removed but I'll like to remove only the digits as from the 12th position so that my result will be $data = HXGE1SR9OWM4
.