Here is my pattern:
/^(?:include|require)(?:_once)*[^"']*['"]([^'"]+)['"]/i
I want to find all three of these lines:
include MODX_CORE_PATH . 'test.php';
require_once MODX_CORE_PATH . 'components/dirwalker/model/dirwalker/dirwalker.class.php';
include MODX_CORE_PATH . 'aaaDummy/aaaDummy.txt';
The Rubular regex tester finds all three, but in my code I’m only getting the first one. I’m sure it’s something simple and obvious, but I can’t see it.