text www.moodle.org</p> text' => 'URL:
text www.moodle.org</p> text',
//decimal url parameter
'URL: www.moodle.org?u=1.23' => 'URL: www.moodle.org?u=1.23',
//escaped space in url
'URL: www.moodle.org?u=test+param&' => 'URL: www.moodle.org?u=test+param&',
//multiple urls
'URL: http://moodle.org www.moodle.org'
=> 'URL: http://moodle.org www.moodle.org',
//containing anchor tags including a class parameter and a url to convert
'URL: http://moodle.org www.moodle.org http://moodle.org'
=> 'URL: http://moodle.org www.moodle.org http://moodle.org',
//subdomain
'http://subdomain.moodle.org - URL' => 'http://subdomain.moodle.org - URL',
//multiple subdomains
'http://subdomain.subdomain.moodle.org - URL' => 'http://subdomain.subdomain.moodle.org - URL',
//looks almost like a link but isnt
'This contains http, http:// and www but no actual links.'=>'This contains http, http:// and www but no actual links.',
//no link at all
'This is a story about moodle.coming to a cinema near you.'=>'This is a story about moodle.coming to a cinema near you.',
//URLs containing utf 8 characters
'http://Iñtërnâtiônàlizætiøn.com?ô=nëø'=>'http://Iñtërnâtiônàlizætiøn.com?ô=nëø',
'www.Iñtërnâtiônàlizætiøn.com?ô=nëø'=>'www.Iñtërnâtiônàlizætiøn.com?ô=nëø',
//text containing utf 8 characters outside of a url
'Iñtërnâtiônàlizætiøn is important to http://moodle.org'=>'Iñtërnâtiônàlizætiøn is important to http://moodle.org',
//too hard to identify without additional regexs
'moodle.org' => 'moodle.org',
//some text with no link between related html tags
'no link here' => 'no link here',
//some text with a link between related html tags
'a link here www.moodle.org' => 'a link here www.moodle.org',
//some text containing a link within unrelated tags
'
This is some text. www.moodle.com then some more text
' => '
This is some text. www.moodle.com then some more text
',
//check we aren't modifying img tags
'image
' => 'image
',
'image
' => 'image
',
'image
' => 'image
',
//and another url within one tag
'