The only possible value this field can have is P followed by a 0,1,2,3,4 and 0,1,2,3,4
$option_print = $this->input->post('print');
if (!preg_match('^/p[0-4][0-4]/', $option_print))
{ redirect('#example'); } else { ... }
Example of VALID inputs:
p00-> validp10-> valid
Example of INVALID inputs:
v00-> invalidf10-> invalidffs-> invalid
So how should my regex be properly structured to filter for VALID inputs?
How about this:
Or even this: