What are some alternative approaches to using preg_match in PHP scripts to achieve the desired output?

Issue: Using preg_match in PHP scripts can sometimes be complex and hard to maintain. An alternative approach to achieve the desired output is to use the built-in string functions in PHP, such as strpos or strstr, which can be simpler and more readable. Alternative approach using strpos:

$string = "Hello, World!";
$substring = "Hello";

if(strpos($string, $substring) !== false) {
    echo "Substring found in string!";
} else {
    echo "Substring not found in string!";
}