Page 1 of 1

Split up source

Posted: Tue May 10, 2005 2:55 pm
by Todd_Z
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....

Code: Select all

  $regex = &quote;#&lt;/?\w+( ї\w-]+=\&quote;.+\&quote;)*( /)?&gt;#&quote;;


http://www.acdrifter.com/tester.php for the progress - It shows the regex expression and the results.

Posted: Wed May 11, 2005 7:11 am
by ody