質問

Hi people I have searched the php website for a fast and simple solution, I searched also on google but nothing that I find seams to work.

preg_match("/\[video-code\](.*?)\[\/video-code\]/", the_content(), $match);
echo "result=".$match[1];

I am trying to get the text in between these to tags "[video-code]...[/video-code]" Is there anybody who can help me out whit probably this small issue? I tried different things but it seams I am doing something wrong!?

Some help would be appreciated.

Thanks in advance.

役に立ちましたか?

解決

'¬\[BeginingOfTag](.*?)\[/EndOfTag]¬is'

I have this pattern on use on a majority of my sites, I've used it in preg_match in the past but mostly in use for preg_replace.. So give it a shot and let me know if it works.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top