original_string: public static function remove_attributes($tag, $attrname) {
          if (is_array($attrname)) {
              $attrname = join('|', $attrname);
          }
          while (preg_match('/^(<[^>]*\b)(' . $attrname . ')=".*?"(.*)$/is', $tag, $matches)) {
              $tag = $matches[1] . $matches[3];
          }
          while (preg_match('~^(<[^>]*\b)(' . $attrname . ')([ />].*)$~is', $tag, $matches)) {
              // Some attributes may not have value, for example: <video controls>.
              $tag = $matches[1] . $matches[3];
          }
          return $tag;
      }
code: public static function remove_attributes($tag, $attrname) {
          if (is_array($attrname)) {
              $attrname = join('|', $attrname);
          }
          while (preg_match('/^(<[^>]*\b)(' . $attrname . ')=".*?"(.*)$/is', $tag, $matches)) {
              $tag = $matches[1] . $matches[3];
          }
          while (preg_match('~^(<[^>]*\b)(' . $attrname . ')([ />].*)$~is', $tag, $matches)) {
              // Some attributes may not have value, for example: <video controls>.
              $tag = $matches[1] . $matches[3];
          }
          return $tag;
      }
code_tokens: public static function remove_attributes ( $ tag , $ attrname ) { if ( is_array ( $ attrname ) ) { $ attrname = join ( '|' , $ attrname ) ; } while ( preg_match ( '/^(<[^>]*\b)(' . $ attrname . ')=".*?"(.*)$/is' , $ tag , $ matches ) ) { $ tag = $ matches [ 1 ] . $ matches [ 3 ] ; } while ( preg_match ( '~^(<[^>]*\b)(' . $ attrname . ')([ />].*)$~is' , $ tag , $ matches ) ) { // Some attributes may not have value, for example: <video controls>. $ tag = $ matches [ 1 ] . $ matches [ 3 ] ; } return $ tag ; }
docstring: Removes an attribute from the media tags
  
  @param string $tag html tag which properties are extracted, for example "<video ...>....</video>"
  @param string|array $attrname
  @return string
docstring_tokens: Removes an attribute from the media tags