Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Im having probably the most rediculous problems with the simplest regular expression ever. Here is the code im trying to parse out of:
[syntax="html"]
<B>Original Message:</B>
<P>
<b>Posted by:</b> someguys name
(<a href="mailto:someguy@somesite.com
">someguy@somesite.com
</a>)<BR>
<b>Organization:</b><a href="http://www.somesite.com
">JAQUET Ltd
</a> <BR><b>Date posted:</b> Thu Jan 14 5:23:11 US/Eastern 2001
<br>
<b>Subject:</b> some subject of a forum
<br>
<b>Message:</b><br> some long message that has no html tags in it
no breaks and no other weird charachters
Code: Select all
preg_match("/<b>Posted by:<\/b>(.*)<BR>/i", $parts[$i],$innerparts);
echo $innerparts[1];$parts[$i] holds the content shown above.
I also tried the following lines with the same result
Code: Select all
preg_match("/\<b\>Posted by:\<\/b\>(.*)\<BR\>/i", $parts[$i],$innerparts);
preg_match("/<b>Posted by:<\/b>(.*?)<BR>/i", $parts[$i],$innerparts);
preg_match("/<b>Posted by:<\/b>(.*?)<BR>/i", $parts[$i],$innerparts);feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]