diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index dbe9112..4903df1 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -2,6 +2,7 @@ File (Field) Paths 7.x-1.x-dev, xxxx-xx-xx (development release)
 --------------------------------------------------------------------------------
 
 - #2211665: Added File path validation to remove unnecessary slashes.
+- #2103151: Removed deprecated /e modifier in preg_match().
 - #2185755 by treksler: Fixed issue with regex, backreferences and numbers.
 - #2047835: Fixed issue with pathauto replacemenets and periods (.).
 - #1985650: Fixed issue with moved Drush file in .info.
diff --git a/filefield_paths.module b/filefield_paths.module
index 989a9d0..3dba703 100644
--- a/filefield_paths.module
+++ b/filefield_paths.module
@@ -298,24 +298,27 @@ function _filefield_paths_replace_path($old, $new, $entity) {
   // Build replacement.
   $info = parse_url(file_stream_wrapper_uri_normalize($new));
   $info['path'] = !empty($info['path']) ? $info['path'] : '';
-  $replacement = "_filefield_paths_replace_path_uri_scheme('\${1}', '{$old}', '{$new}') . '\${2}{$info['host']}{$info['path']}'";
+  $replacement = "_filefield_paths_replace_path_uri_scheme(\$matches[1], '{$old}', '{$new}') . \$matches[2] . '{$info['host']}{$info['path']}'";
 
   // Newer versions of the Image module add an 8 character token which is
   // required if the image style hasn't been generated yet. Look for this token
   // in the query string and replace it.
   if (defined('IMAGE_DERIVATIVE_TOKEN')) {
-    $regex .= '(\?(\S+?&|)' . IMAGE_DERIVATIVE_TOKEN . '=(\S{8})|)';
-    $replacement .= " . _filefield_paths_replace_image_derivative_token('{$old}', '{$new}', '\${5}', '\${7}', '\${3}')";
+    $regex .= '(\?(\S+?&|)' . IMAGE_DERIVATIVE_TOKEN . '=(\S{8})|())';
+    $replacement .= " . _filefield_paths_replace_image_derivative_token('{$old}', '{$new}', \$matches[5], \$matches[7], \$matches[3])";
   }
 
+  // Create an anonymous function for the replacement via preg_replace_callback.
+  $replacement_callback = create_function('$matches', "return {$replacement};");
+
   $fields = field_info_fields();
   foreach ($fields as $name => $field) {
     if ($field['module'] == 'text' && isset($entity->{$field['field_name']}) && is_array($entity->{$field['field_name']})) {
       foreach ($entity->{$field['field_name']} as &$language) {
         foreach ($language as &$item) {
-          $item['value'] = preg_replace("/$regex/e", $replacement, $item['value']);
+          $item['value'] = preg_replace_callback("/$regex/", $replacement_callback, $item['value']);
           if (isset($item['summary'])) {
-            $item['summary'] = preg_replace("/$regex/e", $replacement, $item['summary']);
+            $item['summary'] = preg_replace_callback("/$regex/", $replacement_callback, $item['summary']);
           }
         }
       }
