<?php $str = "required|equals[1|2|3|4|5]|trim"; preg_match_all('/[^\[\|]+(?:\[.+?\])?/', $str, $matches); print_r($matches[0]); ?>
You have javascript disabled. You will not be able to edit any code.