Changeset 544


Ignore:
Timestamp:
Aug 16, 2015 11:08:12 PM (9 years ago)
Author:
anonymous
Message:

Fixed position of hyphen in regex class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Utilities.inc.php

    r541 r544  
    239239            )
    240240            [^\s"`<>]*                  # Match 1 continues with any further valid URL characters
    241             [^\P{Any}%s\s
<>«»"—–]      # Final character not a space or common end-of-sentence punctuation (.,:;?!, etc). Using double negation set, see http://stackoverflow.com/a/4786560/277303
     241            [^\P{Any}\s
<>«»"—–%s]      # Final character not a space or common end-of-sentence punctuation (.,:;?!, etc). Using double negation set, see http://stackoverflow.com/a/4786560/277303
    242242        )
    243243        @Suxi
     
    246246        ($strict ? '' : '|www\.'), // Strict=false allows URLs beginning with www.
    247247        $length,
    248         ($strict ? '' : '?!.,:;)\'-') // Strict=false excludes these characters from set of the last character of URL.
     248        ($strict ? '' : '?!.,:;)\'-') // Strict=false excludes these characters as a possible last character of URL.
    249249    );
    250250
Note: See TracChangeset for help on using the changeset viewer.