diff --git nodewords.admin.inc nodewords.admin.inc
index fa532d3..b6830be 100644
--- nodewords.admin.inc
+++ nodewords.admin.inc
@@ -408,9 +408,10 @@ function nodewords_settings_form() {
   $form['metatags_creation']['metatags_generation']['nodewords_filter_regexp'] = array(
     '#type' => 'textfield',
     '#title' => t('Custom regular expression'),
-    '#description' => t('A regular expression used to filter the text added in the node teaser from a third-party module. The regular expression uses the <a href="http://www.php.net/manual/en/pcre.pattern.php">Perl compatible</a> syntax.'),
-    '#element_validate' => array('nodewords_filter_regexp_validate'),
+    '#description' => t('A regular expression used to filter the text added in the node teaser from a third-party module. The regular expression uses the <a href="http://www.php.net/manual/en/pcre.pattern.php">Perl compatible</a> syntax. Slashes are assumed as delimiters and all expressions are case-sensitive.'),
     '#default_value' => variable_get('nodewords_filter_regexp', ''),
+    '#field_prefix' => '/',
+    '#field_suffix' => '/',
     '#size' => 60,
   );
 
diff --git nodewords.module nodewords.module
index 853d312..43b8c27 100644
--- nodewords.module
+++ nodewords.module
@@ -178,12 +178,10 @@ function nodewords_form_node_type_form_alter(&$form, &$form_state) {
     $form['nodewords']['metatags_generation']['nodewords_filter_regexp'] = array(
       '#type' => 'textfield',
       '#title' => t('Custom regular expression'),
-      '#description' => t('A regular expression used to filter the text added in the node teaser from a third-party module. The regular expression uses the <a href="http://www.php.net/manual/en/pcre.pattern.php">Perl compatible</a> syntax.'),
-      '#element_validate' => array('nodewords_filter_regexp_validate'),
-      '#default_value' => variable_get(
-        'nodewords_filter_regexp_' . $form['#node_type']->type,
-        variable_get('nodewords_filter_regexp', '')
-      ),
+      '#description' => t('A regular expression used to filter the text added in the node teaser from a third-party module. The regular expression uses the <a href="http://www.php.net/manual/en/pcre.pattern.php">Perl compatible</a> syntax. Slashes are assumed as delimiters and all expressions are case-sensitive.'),
+      '#default_value' => variable_get('nodewords_filter_regexp_' . $form['#node_type']->type),
+      '#field_prefix' => '/',
+      '#field_suffix' => '/',
       '#size' => 60,
     );
 
@@ -987,18 +985,21 @@ function nodewords_metatag_from_node_content($node, $content, $options = array()
     variable_get('nodewords_metatags_generation_source', NODEWORDS_GENERATION_TEASER)
   );
 
-  $bool = (
-    $method == NODEWORDS_GENERATION_NONE ||
-    (
-      $method == NODEWORDS_GENERATION_WHEN_EMPTY && !empty($content)
-    )
-  );
-
-  if ($bool) {
+  // If not generating an automatic description, return immediately.
+  if ($method == NODEWORDS_GENERATION_NONE || ($method == NODEWORDS_GENERATION_WHEN_EMPTY && !empty($content))) {
     return $content;
   }
 
+  // If generatingn an automatic description, determine the source.
   if ($source == NODEWORDS_GENERATION_TEASER) {
+    $text = $node->teaser;
+  }
+  elseif ($source == NODEWORDS_GENERATION_BODY || ($source == NODEWORDS_GENERATION_TEASER_BODY && empty($result))) {
+    $text = $node->body;
+  }
+
+  // Clean up the text by running it through applicable filters.
+  if (isset($text)) {
     // We check for the presence of the PHP evaluator filter in the current
     // format. If the text contains PHP code, we do not split it up to prevent
     // parse errors.
@@ -1011,7 +1012,7 @@ function nodewords_metatag_from_node_content($node, $content, $options = array()
       $text = strip_tags(
         preg_replace_callback('/<img\s[^>]*alt=["\']([^"\']*)["\'][^>]*>/i',
           '_nodewords_match_callback',
-          $node->teaser
+          $text
         )
       );
 
@@ -1030,11 +1031,15 @@ function nodewords_metatag_from_node_content($node, $content, $options = array()
         }
       }
 
-      // Remove the text matching the regular expression.
-      if ($regexpr = trim(variable_get('nodewords_filter_regexp', ''))) {
-        $text = preg_replace('/' . $regexp . '/i', '', $text);
+      // Remove the text matching the type-specific regular expression.
+      if ($regexp = trim(variable_get('nodewords_filter_regexp_' . $node->type, ''))) {
+        $text = preg_replace('/' . $regexp . '/', '', $text);
       }
 
+      // Remove the text matching the global regular expression.
+      if ($regexp = trim(variable_get('nodewords_filter_regexp', ''))) {
+        $text = preg_replace('/' . $regexp . '/', '', $text);
+      }
 
       $result = node_teaser(
         trim(preg_replace('/(\r\n?|\n)/', ' ', $text)),
@@ -1043,36 +1048,6 @@ function nodewords_metatag_from_node_content($node, $content, $options = array()
     }
   }
 
-  $bool = (
-    $source == NODEWORDS_GENERATION_BODY ||
-    (
-      $source == NODEWORDS_GENERATION_TEASER_BODY && empty($result)
-    )
-  );
-
-  if ($bool) {
-    // We check for the presence of the PHP evaluator filter in the current
-    // format. If the text contains PHP code, we do not split it up to prevent
-    // parse errors.
-    if (isset($filters['php/0']) && strpos($node->body, '<?') !== FALSE) {
-      return '';
-    }
-
-    // Replace the tag IMG with the attribute ALT, and strip off all the
-    // HTML tags.
-    $text = strip_tags(
-      preg_replace_callback('/<img\s[^>]*alt=["\']([^"\']*)["\'][^>]*>/i',
-        '_nodewords_match_callback',
-        $node->body
-      )
-    );
-
-    $result = node_teaser(
-      trim(preg_replace('/(\r\n?|\n)/', ' ', $text)),
-      $node->format, $options['size']
-    );
-  }
-
   return $result;
 }
 
