This file is indexed.

/usr/share/php/kohana3.2/modules/codebench/classes/bench/gruberurl.php is in libkohana3.2-mod-codebench-php 3.2.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
 * @package    Kohana/Codebench
 * @category   Tests
 * @author     Geert De Deckere <geert@idoe.be>
 */
class Bench_GruberURL extends Codebench {

	public $description =
		'Optimization for http://daringfireball.net/2009/11/liberal_regex_for_matching_urls';

	public $loops = 10000;

	public $subjects = array
	(
		'http://foo.com/blah_blah',
		'http://foo.com/blah_blah/',
		'(Something like http://foo.com/blah_blah)',
		'http://foo.com/blah_blah_(wikipedia)',
		'(Something like http://foo.com/blah_blah_(wikipedia))',
		'http://foo.com/blah_blah.',
		'http://foo.com/blah_blah/.',
		'<http://foo.com/blah_blah>',
		'<http://foo.com/blah_blah/>',
		'http://foo.com/blah_blah,',
		'http://www.example.com/wpstyle/?p=364.',
		'http://✪df.ws/e7l',
		'rdar://1234',
		'rdar:/1234',
		'x-yojimbo-item://6303E4C1-xxxx-45A6-AB9D-3A908F59AE0E',
		'message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e',
		'http://➡.ws/䨹',
		'www.➡.ws/䨹',
		'<tag>http://example.com</tag>',
		'Just a www.example.com link.',
		// To test the use of possessive quatifiers:
		'httpppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp',
	);

	public function bench_daringfireball($subject)
	{
		// Original regex by John Gruber
		preg_match('~\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))~', $subject, $matches);
		return (empty($matches)) ? FALSE : $matches[0];
	}

	public function bench_daringfireball_v2($subject)
	{
		// Removed outer capturing parentheses, made another pair non-capturing
		preg_match('~\b(?:[\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|(?:[^[:punct:]\s]|/))~', $subject, $matches);
		return (empty($matches)) ? FALSE : $matches[0];
	}

	public function bench_daringfireball_v3($subject)
	{
		// Made quantifiers possessive where possible
		preg_match('~\b(?:[\w-]++://?+|www[.])[^\s()<>]+(?:\([\w\d]++\)|(?:[^[:punct:]\s]|/))~', $subject, $matches);
		return (empty($matches)) ? FALSE : $matches[0];
	}

}