hello dear php-developers
on the way to a robust REGEX for phpBB. Need a PERL-regEX that filters out the following data out of the dump of a phpBB that runs this standard theme.
i have to do some hard jobs on phpBB and i need to work with reg Expressions of Perl. Regex are a good way to help to filter out all the unnecessary parts of a page source. So - lets start - ineed the regex of the following parts
[ this i have taken from the list http://www.phpbbdoctor.com/doc_tables.php ]
phpbb_categories Categories
phpbb_forums Forums for your board.
phpbb_groups A group of users
phpbb_posts Posts for your board.
phpbb_posts_text The text for the post
phpbb_topics Topics for your board.
phpbb_users Base user information, preference settings, and so on.
and the timestamp.
ideas:
Code: /<td width="\d+" align="\w+" valign="\w+" class=".*"><span class="name"><a name="\d+"></a><b>(.*)</b></span><br /><span class="postdetails">user<br /><br /><br />regdate (.*)<br />posts: (.*)<br />/
Subpattern 1 give the Username, Subpattern 2 the register-timestamp of the Users pattern 3 gives back the number of posting.
Code: /\s+<td width="100%"><a href="viewtopic.php?p=\d+#\d+"><img src=".*"
width="\d+" height="\d+" alt="Beitrag" title="posting" border="\d+" /></a><span class="postdetails">timestamp: (.*)<span class="gen"> </span> Titel:
(.*)</span></td>/
Subpattern 1 gives time of composing Nr2 gives the title
what about Metacharacters & the others they have to get tracked down with Backslash?
^ $ + ? . * ( ) [ ] { } / \ |
HTML/PHP Code has to be taken away - how look forward to hear from you. What else has to go into the robust regex!
please help out.
greetings