Template Blocks.
Posted: Mon Oct 17, 2005 9:10 pm
Hi, im making a template system and having a little trouble with the regex.
this is my regex to find the blocks but its not working when i put new lines.
This is the style that won't work.
Where if i use this it will.
Please reply soon.
~AL69
Code: Select all
$pattern = "|(<!-- START $blkName -->)(.*)(<!-- CLOSE $blkName -->)|";This is the style that won't work.
Code: Select all
<!-- START myBlock -->
<!-- START nesting.myBlock -->
Text<br />
<!-- CLOSE nesting.myBlock -->
<!-- CLOSE myBlock -->Code: Select all
<!-- START myBlock --><!-- START nesting.myBlock -->Text<br /><!-- CLOSE nesting.myBlock --><!-- CLOSE myBlock -->~AL69