Reg. Express

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reg. Express

    Hallo Zusammen,

    Ich habe folgendes Problem

    PHP Code:
    <?php
    $string 
    "blah blah <sgs; the string to be extracted ;sgs>";

    eregi "<sgs;(.*);sgs>"$string ,$regs) ;

    echo 
    $regs[1];
    ?>
    Ergebnis : the string to be extracted
    bis dahin alles läuft prima


    aber wenn ich einen anderen String habe

    PHP Code:
    $string "blah blah <sgs; the string to be extracted ;sgs> blah blah blah <sgs; another string to be extracted ;sgs> blah blah blah"

    //Ergebnis : the string to be extracted ;sgs> blah blah blah <sgs; another string to be extracted ;sgs> blah blah blah 
    Hat jemand Idee, wie ich dieses Problem löse?

    Danke

    Grüsse

  • #2
    http://www.dclp-faq.de/q/q-regexp-gierig.html

    Comment


    • #3
      leider hilft mir Deiner URL nicht weiter

      Comment


      • #4
        Doch, doch, tut sie schon, wenn man lesen kann

        Comment

        Working...
        X