How can you combine multiple regular expressions in PHP to match different patterns?

To combine multiple regular expressions in PHP to match different patterns, you can use the `|` (pipe) operator to create a single regular expression that matches any of the individual patterns. This allows you to check for multiple patterns in a single regex match.

$pattern1 = '/pattern1/';
$pattern2 = '/pattern2/';
$combinedPattern = '/pattern1|pattern2/';

$string = 'example string';

if (preg_match($combinedPattern, $string)) {
    echo 'String matches either pattern1 or pattern2';
} else {
    echo 'String does not match any of the patterns';
}