Check input preg_match?

Tell me, please.
preg_match how to set a rule must begin with the @symbol
March 19th 20 at 08:52
1 answer
March 19th 20 at 08:54
Solution
if (preg_match('/^@/', $_POST['test'])){
//ok
}

else {
// error
}

Find more questions by tags PHP