Split up source
Posted: Tue May 10, 2005 2:55 pm
Two regex's needed:
1. preg_split source code into an array like this:
[0] => <!DOCTYPE .....>
[1] => <html>
[2] => <head>
[3] => <title>
[4] => Acdrifter.com
[5] => </title>
[6] => </head>
[etc.......]
2. preg_math to see whether a line of that code is a tag or a content entry.
true: </head>
true: <div class="box" style="margin-top: 5px;">
etc....
1. preg_split source code into an array like this:
[0] => <!DOCTYPE .....>
[1] => <html>
[2] => <head>
[3] => <title>
[4] => Acdrifter.com
[5] => </title>
[6] => </head>
[etc.......]
2. preg_math to see whether a line of that code is a tag or a content entry.
true: </head>
true: <div class="box" style="margin-top: 5px;">
etc....
Code: Select all
$regex = "e;#</?\w+( ї\w-]+=\"e;.+\"e;)*( /)?>#"e;;
http://www.acdrifter.com/tester.php for the progress - It shows the regex expression and the results.