3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $matches = []; $message = 'Stack:arn:aws:cloudformation:us-west-2:717531488628:stack/magento-env-stage-mounttargets/9f7206d0-3e1e-11e6-941a-50d5ca0184f2 is in CREATE_FAILED state and can not be updated.'; preg_match('/~Stack\[(.+)\] is in ([A-Z_]+) state and can not be updated./', $message, $matches); var_dump($matches);
based on j2WQY
Output for 5.5.0 - 7.3.0alpha1
array(0) { }