Im looking for function (PHP will be the best), which returns true whether exists string matches both regexpA and regexpB.
Example 1:
$regexpA = \'[0
For regular expressions that are actually regular (i.e. don't use irregular features like back references) you can do the following: