[Solved] How to extract URLs from within a string containing markup? December 6, 2022 by Kirat Following pattern extracts it all. @\[(img|thumb)\](.+?)\[/\\1@ Ideone solved How to extract URLs from within a string containing markup?