Plugin Directory

Changeset 2962656


Ignore:
Timestamp:
09/04/2023 05:45:05 PM (3 years ago)
Author:
opensug
Message:

Update regular expressions:/(?:[\p{P}\p{S}]?[^\p{P}\p{S}]){0,5}($keyword)(?:[^\p{P}\p{S}][\p{P}\p{S}]?){0,5}/uig [L111]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • opensug/trunk/index.php

    r2957974 r2962656  
    109109
    110110                    if ( strlen( $contents ) > 0 ) {
    111                         preg_match_all( "/(\w{0,5}\W{0,5}){$keyword}(\w{0,5}\W{0,5})/uis", $contents, $matches );
     111                        preg_match_all( "/(?:[\p{P}\p{S}]?[^\p{P}\p{S}]){0,5}($keyword)(?:[^\p{P}\p{S}][\p{P}\p{S}]?){0,5}/uis", $contents, $matches );
    112112                        $keys = array_merge( $keys, $matches[0] );
    113113                        $keys = array_unique( $keys );
Note: See TracChangeset for help on using the changeset viewer.