Reply to Re: regular expression problem (simple level)

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация