<?php $re = '/\[\[([^][|]*?)\|([^][]*?)]]/';$str = 'foo [[http://www.google.com|This Link points to google]] foo [[http://w...content-available-to-author-only...e.com|This Link points to more]]';echo preg_replace($re, '<a href="$1">$2</a>', $str);
Standard input is empty
foo <a href="http://www.google.com">This Link points to google</a> foo <a href="http://w...content-available-to-author-only...e.com">This Link points to more</a>
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!