7
I have two regular expressions:
$exp1 = '/^abc.*\_20150430.txt$/'
$exp2 = '/^def.*\_20150430.txt$/'
Must return true for archives started by abc in the first and def in the second. In the two expressions the string must 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?
it should escape . (dot) after the 20150430 :P
– wryel