With a cURL request I load a complete website into a variable: $buffer.
In the source of the site there are two labels in between which my relevant content is placed.
****** bunch of code *******
<!-- InstanceBeginEditable name="Kopij" -->
this part I want to store in a match
<!-- InstanceEndEditable -->
****** bunch of code *******
I’ve been messing around with preg_match and its regexp. Can someone try to help me?
Thanx in advance.
//edit
The $buffer is this text file: http://www.rp-systeem.nl/rps/code.txt
I want to substract 103 to 176
The above snippet prints (as seen on ideone.com):
The part that you want to match is captured as group 1. There’s nothing special in the pattern, except that it’s in single-line mode so
.matches everything (just in case you have multiple lines).References
preg_match