|
Posted by nescio on 12/19/05 14:13
"Janwillem Borleffs" <jw@jwscripts.com> schreef in bericht
news:43a69b44$0$185$dbd41001@news.euronet.nl...
> 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);
when i use this i get the following result:
$newname = 'jansen*';
how do i get rid of the '*', i have tried changing/adding something but
although a lot happens,
nothing good comes out of it?
thanks
Navigation:
[Reply to this message]
|