Hello,
I have a simple text that is being parsed with PHP. In that text, I sometimes use following syntax:
Here's the text... {$video:path/to/my/video.mp4} and here the text goes on.
Now, what I need, is, by means regex, to replace this {$video:path/to/my/video.mp4}
with the returned string of this: $someObject->processVideoSource('path/to/my/video.mp4');
. So, you see, I need to find these expressions, filter the source from {$video:
and }
, and then run a function on that source, which replaces the whole expression. How can I do this with preg_replace or stuff like that?
Please Keep in mind that I have different instances of that expression in the text file I am parsing and that each video has its own source. And excuse the badly chosen title ^^
Thanks A LOT in advance!