It's a lame way, but it works,
I sure hope that someone can tell me how to do it in pure regexp.
like how can i 'search for next occurence' in ereg or any regexp() in PHP

-
<?
  $str = "14```value```value2`````value3``hehe!``hohoho";
  while ( ereg("[^`]+", $str, $result) )
  {
    $match = $result[0];
    $pos   = strpos($str, $match);
    for ($i = $pos; $i < strlen($match)+$pos; $i++)
      $str[$i] = "`";
//    echo "pos=$pos, matched: $match, str=$str<br>";
    echo "matched: $match<br>\n";
  }
?>
-
""David Balatero"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ok, i have a text file with lines that looks like this:
>
> 14```value```value2`````value3
>
> This would be fine, except...there are sometimes more ```` than in other
> columns, so id like it to be
>
> 14``value``value2``value3
>
> So I can explode() it into a mysql database. Can anyone offer a regexp for
> this?
>
> Thanks!
> David Balatero
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to