I'm processing a file with PHP.
This file contains a few blocks, which always start with the word "Step" (step 1, step 2 etc), and always end with "end step". Withing, it can have newlines, but never 2 consequently.
I'm trying to build a regex that will turn this into an array.
What I have so far is
preg_match_all("/Step([^\"end step\"]*)/s", $content, $matches);
The /s at the end of the patnern is to allow newslines to be included too. But of course, this does not work since all letters from "end step" are excluded, not only if they form 1 word. How can I write the correct regex?