diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-02-12 07:58:36 -0500 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-02-12 07:58:36 -0500 |
commit | 99773e3b5ef0fa395bccb9a9656afe7552d42594 (patch) | |
tree | 558b6f0c82f39d3e07f1654593bd3f6ed515ea63 /lib | |
parent | a845d06c77f17a5037e30d41db939f0ed3b5936e (diff) |
wrap multiline regexp in quotes so it doesn't mess up my editor's indenting
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/util.php b/lib/util.php index c0c980111..03e3618db 100644 --- a/lib/util.php +++ b/lib/util.php @@ -394,20 +394,20 @@ function common_render_text($text) function common_replace_urls_callback($text, $callback) { // Start off with a regex - $regex = '# - (?: - (?: - (?:https?|ftps?|mms|rtsp|gopher|news|nntp|telnet|wais|file|prospero|webcal|xmpp|irc):// - | - (?:mailto|aim|tel): - ) - [^.\s]+\.[^\s]+ - | - (?:[^.\s/:]+\.)+ - (?:museum|travel|[a-z]{2,4}) - (?:[:/][^\s]*)? - ) - #ix'; + $regex = '#'. + '(?:'. + '(?:'. + '(?:https?|ftps?|mms|rtsp|gopher|news|nntp|telnet|wais|file|prospero|webcal|xmpp|irc)://'. + '|'. + '(?:mailto|aim|tel):'. + ')'. + '[^.\s]+\.[^\s]+'. + '|'. + '(?:[^.\s/:]+\.)+'. + '(?:museum|travel|[a-z]{2,4})'. + '(?:[:/][^\s]*)?'. + ')'. + '#ix'; preg_match_all($regex, $text, $matches); // Then clean up what the regex left behind |