Changeset 427


Ignore:
Timestamp:
Oct 31, 2013 7:39:17 PM (11 years ago)
Author:
anonymous
Message:

Added unicode case to word split 3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/SpellCheck.inc.php

    r426 r427  
    201201        // Split words on punctuation except apostrophes
    202202        // http://stackoverflow.com/questions/790596/split-a-text-into-single-words
    203         $words = preg_split("/((^\p{P}+)|(\p{P}*\s+\p{P}*)|[\p{Pd}-–—]+|(\+|(\p{P}+$))/", $string);
     203        $words = preg_split("/((^\p{P}+)|(\p{P}*\s+\p{P}*)|([\p{Pd}–—-]+)|(\+|(\p{P}+$))/", $string);
    204204        // Remove non-word elements.
    205205        $words = preg_grep('/\w+/', $words);
Note: See TracChangeset for help on using the changeset viewer.