[snip]
I'm trying to replace a substr of the string that start from "Rated
blahblah;" azt the end semicolon.

Example:
safsagfasdfsdfdsfRated by 4 people;fafafaafafaf -> return
safsagfasdfsdfdsffafafaafafaf

$replacement =""; 
$pattern = "/Rated.+;/"; 
$found_str = preg_replace($pattern, $replacement, $found_str);

Why this above, doesn't work?
[/snip]

What does it return? Try this ...

$string = "safsagfasdfsdfdsfRated by 4 people;fafafaafafaf";

$replacement ="";
$pattern = "/Rated.+;/";
$found_str = preg_replace($pattern, $replacement, $string);

echo $found_str;

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to