Hello all and thanks for reading my question.
I'm trying to make a mini online regex tester for testing my expressions
$PostReg = trim( $_POST['regex'] );
$PostTst = trim( $_POST['chars'] );
IF ( isSet ( $_POST['regex'] ) ){
IF ( !preg_match( $PostReg, $PostTst, $matches ) ){
$Out = "No Errors in Posted Text <br />Chars = ". $PostTst . "<br />Within bounds of " . $PostReg;
}ELSE{
$Out = "Error in Posted Text match = ". $matches[0];
}
}
so I have a form that posts the data for $PostReg, $PostTst
The values are as follows in the actual form fields
$PostReg = /[0-9]{6}$/
$PostTst = 123556655856525m
it returns that No Errors in Posted Text even it I send an empty field for $PostTst it still says No Errors in Posted Text
Thanks for any help