PHP Function preg_match
preg_match – this function is used to perform a pattern match on a string. It returns true if a match is found and false if a match is not found.
This function may return Boolean
FALSE, but may also return a non-Boolean value which evaluates to
FALSE. Use the === operator for testing the return value of this function.
We can use this function to search for any patterns. I have used it to search text inputs for any code injections.