[Resolved] Parsing HTML File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leguvan
    New Member
    • Aug 2007
    • 1

    #1

    [Resolved] Parsing HTML File

    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...
    Last edited by leguvan; Aug 2 '07, 05:27 PM. Reason: Resolved
  • kovik
    Recognized Expert Top Contributor
    • Jun 2007
    • 1044

    #2
    FYI, you don't need to escape the '<' characters.

    Comment

    Working...