To my shame, i know not how to use regular expressions properly. I have a large text file, and i am interested in matching every occurence of strings between the tags [POLYLINE] and [END]. The structure does not nest, meaning i do not have other [POLYLINE] and [END] tags inside other [POLYLINE] and [END]. I have tried :
preg_match_all('/\[POLYLINE\](.*?)\[END\]/', $fileContents, $matches);
Hoping to get an array of strings inside $matches. This returns something, but not what i need.