Hi,
the following might sound a little dumb but it seems I am not capable of understanding regular expressions at all. I am building a template system in php. works all great so far. Now i am trying to implement files into a template and need to find out a few things. So here is where I stand:
I have a complete html-file in a one-line string. now I want to extract 3 things from it using preg_replace.
1) anything between <head> and </head> EXcluding <title> and <meta> tags.
2) any parameters in the body-tag which are event related. e.g. onload onunload onclick etc. but not styletags and no things like bgcolor and stuff either
3) everything between <body> and </body>
I plan und putting it together in a string like and then explode it to have all 3 values in an array. like:
$result = "\1#\2#\3";
$data = explode("#",$result);
that part should work... I just need the reg-exp. So please guys help me out
Thanx in advance!
Dominik