Title: Warning: preg_replace(): Unknown modifier &#039; &#039;
Last modified: August 22, 2016

---

# Warning: preg_replace(): Unknown modifier ' '

 *  [tekehe](https://wordpress.org/support/users/tekehe/)
 * (@tekehe)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/warning-preg_replace-unknown-modifier-1/)
 * I get this error :
 * > Warning: preg_replace(): Unknown modifier ‘ ‘ popularity-contest.php on line
   > 2572
 *     ```
       function akpc_is_searcher() {
               global $akpc;
               $referrer = parse_url($_SERVER['HTTP_REFERER']);
               $searchers = explode(' ', preg_replace("\n|\r|\r\n|\n\r", ' ', $akpc->searcher_names));
               foreach ($searchers as $searcher) {
                       if (strpos($referrer['host'], $searcher) !== false) {
                               return true;
                       }
               }
               return false;
       }
       ```
   
 * Can someone please help me to fix this problem?

The topic ‘Warning: preg_replace(): Unknown modifier ' '’ is closed to new replies.

## Tags

 * [preg_replace](https://wordpress.org/support/topic-tag/preg_replace/)

 * 0 replies
 * 1 participant
 * Last reply from: [tekehe](https://wordpress.org/support/users/tekehe/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/warning-preg_replace-unknown-modifier-1/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
