Constant

TextHelper::AUTO_LINK_RE

There's no documentation for this item.

%r{
 (                          # leading text
   <\w+.*?>|                # leading HTML tag, or
   [^=!:'"/]|               # leading punctuation, or 
   ^                        # beginning of line
 )
 (
   (?:https?://)|           # protocol spec, or
   (?:www\.)                # www.*
 ) 
 (
   [-\w]+                   # subdomain or domain
   (?:\.[-\w]+)*            # remaining subdomains or domain
   (?::\d+)?                # port
   (?:/(?:(?:[~\w\+@%=-]|(?:[,.;:][^\s$]))+)?)* # path
   (?:\?[\w\+@%&=.;-]+)?     # query string
   (?:\#[\w\-]*)?           # trailing anchor
 )
 ([[:punct:]]|\s|<|$)       # trailing text
}x unless const_defined?(:AUTO_LINK_RE)
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.