Hi. I would like to do some complex string replace, but I'm a little lost. I know I should use preg_replace or something like this, but I'm not good enough at this yet. Here is what I want to do.
I have a string: 'this is some {{random}} text'
What I want to do is replace '{{random}}' with just 'random' (well not really, but I'm simplyfying here)
Of course it could be anything else than the word 'random' in the original string, I'm not supposed to know what it'll be.
Could anyone please help? Thanks.