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! 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); 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! 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! Link to comment https://forums.phpfreaks.com/topic/75643-solved-find-expressions-like/#findComment-383289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.