<?php $tel = '091-9869123456'; if(preg_match("/^[091]{3}-[0-9]{10}$/", $tel)) { echo "valid";} else { echo "invalid";}
Standard input is empty
valid
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!