<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Arial">Hello,<br>
      <br>
      I would like to slice the following string with regexp:<br>
      <br>
      <font face="Courier New, Courier, monospace">texte = "voir
        <a class="moz-txt-link-freetext" href="http://help.scilab.org/docs/5.4.1/fr_FR/regexp.html">http://help.scilab.org/docs/5.4.1/fr_FR/regexp.html</a>";<br>
        [iD, iF, matchs, captures] =
        regexp(texte,"|[^\s]+\:\/\/([^\/]+\/)+([^\/]*$)|i"); captures<br>
        <br>
      </font></font>returning<br>
    <br>
    <font face="Courier New, Courier, monospace"><big><small>!fr_FR/
          regexp.html !
        </small></big></font><br>
    <big><br>
    </big>while i would expect <br>
    <br>
    <font face="Courier New, Courier, monospace">help.scilab.org/ docs/
      5.4.1/ fr_FR/ regexp.html<br>
    </font><br>
    since the capturing parentheses are iterated <i>at leas</i>t once
    by the ending + (as {1,} would do)  in<br>
    <font face="Arial"><font face="Courier New, Courier, monospace">([^\/]+\/)+<br>
        <br>
      </font></font>This slicing it likely possible with strtok() or
    strindex(), but i do not understand why with regexp<br>
    the iteration is not performed. Nor with <br>
    <font face="Arial"><font face="Courier New, Courier, monospace">([^\/]+?\/)+</font></font><br>
    <br>
    Any hint would be appreciated<br>
    Regards<br>
    Samuel<br>
    <br>
    <font face="Arial"><font face="Courier New, Courier, monospace"></font></font>
  </body>
</html>