Add a custom class to the Edit Comment Link in WordPress

function myclass_edit_comment_link( $output ) {
  $myclass = 'myclass';
  return preg_replace( '/comment-edit-link/', 'comment-edit-link ' . $myclass, $output, 1 );
}
add_filter( 'edit_comment_link', 'myclass_edit_comment_link' );