rarroyo Posted November 1, 2007 Share Posted November 1, 2007 Hi, I can not find how to get all the links within my Wiki, I need to find the number of strings enclosed between [[]] I tried /\[\]/ but for this regexpression, for input "[[anArticle1]] some text [[anArticle2]]" , only returns 1. Remember in Wiki a wikitext like [[anArticle]] would be rendered as a link to "anArticle" page. Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/75643-solved-find-expressions-like/ Share on other sites More sharing options...
effigy Posted November 1, 2007 Share Posted November 1, 2007 preg_match_all('/\[\[(.*?)\]\]/', $data, $matches); Quote Link to comment https://forums.phpfreaks.com/topic/75643-solved-find-expressions-like/#findComment-382787 Share on other sites More sharing options...
rarroyo Posted November 1, 2007 Author Share Posted November 1, 2007 Thank you very much, I will try this at home! Quote Link to comment https://forums.phpfreaks.com/topic/75643-solved-find-expressions-like/#findComment-382813 Share on other sites More sharing options...
rarroyo Posted November 2, 2007 Author Share Posted November 2, 2007 It works fine, thanks a lot! Quote Link to comment https://forums.phpfreaks.com/topic/75643-solved-find-expressions-like/#findComment-383289 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.