I have two regular expressions:
$exp1 = '/^abc.*\_20150430.txt$/'
$exp2 = '/^def.*\_20150430.txt$/'
It should return true for files started by abc in the first and def in the second. In both expressions the string should end with _20150430.txt . For what I need to do:
if(preg_match($exp1, $str) || preg_match($exp2, $str)) {
// Do something
}
How do I do this in a single regular expression?