Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

hi folks.

I'm in trouble
PHP on apache:

 $such  =array('/a*d/');
 $ersetz=array(' ersetz ');
 echo "before!!!! $filestream";                                 // -->
abcdefghi abcdefghi
 $filestream=preg_replace($such, $ersetz, $filestream);
 echo "after !!!! $filestream";                                 // --> abc
ersetz efghi abc ersetz efghi

but I'm expecting:
ersetzefghi ersetzefghi

where's my error?

Re: regexp

thanks a lot, christoph and myron!

I had a complete misunderstanding of regexp, thought that simple
substitutions are also simple here...

I'm not really firm witth regex, so I will visit this group later again...

@Myron: I want to expand this little proggy to make *a lot of* replacements,
so I began with an array...

greetings walter

Quoted text here. Click to load it

Site Timeline