pattern matching

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ofuuzo1@yahoo.no

    #1

    pattern matching

    Hi,
    I am new to php. I have text files each containing some metadata. I
    would like to use preg_replace to remove some of the fields in each
    text file. Some contents of a field can go over several lines. How can
    I do it using preg_replace?

    Thanks in advance
    Ofuuzo

    <?xml version="1.0" encoding="utf-8" standalone="no" ?>
    <dublin_core schema="dc">
    <dcvalue element="contri butor" qualifier="advi sor">Test, Testman
    several lines several lines several lines several lines several
    lines several lines several lines several lines several lines
    several lines several lines several lines several lines </
    dcvalue>
    <dcvalue element="date" qualifier="issu ed">2007-11-15</dcvalue>
    <dcvalue element="format " qualifier="exte nt">4869077 bytes</
    dcvalue>
    <dcvalue element="format " qualifier="mime type">applicati on/pdf</
    dcvalue>
    <dcvalue element="langua ge" qualifier="iso" >nob</dcvalue>
    <dcvalue element="subjec t" qualifier="cour seID">NOR-3920</dcvalue>
    <dcvalue element="subjec t" qualifier="depa rtmentID">6640</dcvalue>
    </dublin_core>

Working...