Menu
Hi
I’m trying to work out how to use the preg_replace (I think) function, but fail to understand this (I guess) simple stuff.
What I want to do is to replace certain unknown strings inside a string with a third string (!). For example:
Kill process apache on server mainsrv01
to
Kill process censored on server censored
I cannot simply use str_replace since I do not know what will be in the text, but I know it will be like this with “wildcards”:
Kill process * on server
I have several such strings, so how should I do this?
Thanks for your help and understanding ?
Lubox