extract a part of string from other string

extract a part of string from other string

am 13.11.2007 16:34:18 von artev

I would like to extract a piece of string inner oneother;
how rule for extraction all text inner this ">.......


example if I have this string

  • Title &
    Test


  • the code will return Title & Test

    Re: extract a part of string from other string

    am 14.11.2007 20:16:21 von unknown

    Post removed (X-No-Archive: yes)

    Re: extract a part of string from other string

    am 16.11.2007 12:10:17 von BoneIdol

    On 14 Nov, 19:16, Tom wrote:
    > On Tue, 13 Nov 2007 16:34:18 +0100, artev wrote...
    >
    > >I would like to extract a piece of string inner oneother;
    > >how rule for extraction all text inner this ">.......
    >
    > >example if I have this string
    > >

  • Title &
    > >Test

  • >
    > >the code will return Title & Test
    >
    > You can use preg_replace() similar to this...
    >
    > >
    > $string = '
  • Title
    > & Test
  • ' ;
    >
    > echo preg_replace('/
  • (.+)<\/a>\<\/li>/', "$1", $string);
    >
    > ?>
    >
    > Tom
    > --
    > NewsGuy Free Trial Accounts
    > Now a massive 20 Gigabytes of unrestricted downloads !http://newsguy.com/

    If you're just wanting to strip all the html from input (and I mean
    strip, not escape with entities) just use strip_tags(). I haven't used
    it in a long time, but I seem to recall that it would leave the text
    between tags unmolestred.

    http://www.php.net/strip-tags