diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index c4f285c905..10788d0d6a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2746,7 +2746,8 @@ function get_preg_expression($mode)
return array(
'#.*?#',
'#.*?#',
- '#(.*?)#',
+ '#\2#',
+ '#.*?#',
'#
http://www.phpbb.com',
'http://www.phpbb.com'
),
+ array(
+ 'this is just text',
+ 'http://www.phpbb.com'
+ ),
+ array(
+ 'http://www.phpbb.com/some/ ... /shortened',
+ 'http://www.phpbb.com/some/more/link/that/is/shortened'
+ ),
/**
* Fails as per PHPBB3-8420
* @link http://tracker.phpbb.com/browse/PHPBB3-8420