[Solved] Php preg_match_all, wordpress function [closed]
[ad_1] The code you found on the internet is kind of irrelevant. In order to achieve what you want you need something like this: $str = “[image name=ubuntustudio-tribal-54] “; $pat = “~\[image name=([^\]]+)~i”; preg_match($pat, $str, $matches); $name = $matches[1]; After that $name would be bound to ubuntustudio-tribal-54. See the docs for more details regarding PHP’s … Read more