original_string: public function strip_applet_tags_get_mathml($string) {
          if (stristr($string, '</APPLET>') === false) {
              return $string;
          } else {
              // Strip all applet tags keeping stuff before/after and inbetween (if mathml) them.
              while (stristr($string, '</APPLET>') !== false) {
                  preg_match("/(.*)\<applet.*value=\"(\<math\>.*\<\/math\>)\".*\<\/applet\>(.*)/i", $string, $mathmls);
                  $string = $mathmls[1].$mathmls[2].$mathmls[3];
              }
              return $string;
          }
      }
code: public function strip_applet_tags_get_mathml($string) {
          if (stristr($string, '</APPLET>') === false) {
              return $string;
          } else {
              // Strip all applet tags keeping stuff before/after and inbetween (if mathml) them.
              while (stristr($string, '</APPLET>') !== false) {
                  preg_match("/(.*)\<applet.*value=\"(\<math\>.*\<\/math\>)\".*\<\/applet\>(.*)/i", $string, $mathmls);
                  $string = $mathmls[1].$mathmls[2].$mathmls[3];
              }
              return $string;
          }
      }
code_tokens: public function strip_applet_tags_get_mathml ( $ string ) { if ( stristr ( $ string , '</APPLET>' ) === false ) { return $ string ; } else { // Strip all applet tags keeping stuff before/after and inbetween (if mathml) them. while ( stristr ( $ string , '</APPLET>' ) !== false ) { preg_match ( "/(.*)\<applet.*value=\"(\<math\>.*\<\/math\>)\".*\<\/applet\>(.*)/i" , $ string , $ mathmls ) ; $ string = $ mathmls [ 1 ] . $ mathmls [ 2 ] . $ mathmls [ 3 ] ; } return $ string ; } }
docstring: Strip the applet tag used by Blackboard to render mathml formulas,
  keeping the mathml tag.
  @param string $string
  @return string
docstring_tokens: Strip the applet tag used by Blackboard to render mathml formulas keeping the mathml tag .