mbstring can be built without mbregex support, in which case these tests would fail. Thus we add respective skip conditions.
Closes bug #72710 (cherry picked from commit 0fb7eb6723)
0fb7eb6723