By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

[Resolved] Parsing HTML File

P: 1
Hi,

I am trying to use preg_match to help parse an html file uploaded to the server. Right now I am just trying to get information that is between <b> and </b>, everything I have tried has returned errors by preg_match. I have tried using multiple patterns posted that I have seen and none have worked.

'<b>match1</b>' , character: '<b>match2</b>'

trying to get an expression to get match1 and match 2 out of that string...

Thanks for the help

*EDIT*

Finally figured it out by using two different expressions and using different peices of them together...

$pattern = "/\<b>(.+)\<\/b>/smU";

there it is for any one else who may need...
Aug 2 '07 #1
Share this Question
Share on Google+
1 Reply


kovik
Expert 100+
P: 1,044
FYI, you don't need to escape the '<' characters.
Aug 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.