|
Posted by Janwillem Borleffs on 12/19/05 13:36
nescio wrote:
> i tried to use a regular expression to do this:
> $newname = ereg_replace('^(/\*)([a-zA-Z]+)(\*/)$', '',$name);
>
> but i always get the same value back:
> $newname = "/*jansen*/jansen";
>
> what am i doing wrong?
>
$newname = preg_replace('|^/\*([^/]+).*|', '$1', $name);
JW
Navigation:
[Reply to this message]
|