How can I detach from post content iframe, image and default gallery in Wordpress
===

I want to detach from post content all images, iframes and default galleries so my post can have two columns. I have already found somewhere php code wich uses preg_replace and preg_match_all, so now in column on the left I have only text from the post and in column on the right side are only imagies. So my question is: "What code do I need to detach also iframes and galleries from column with text to put them in column on the right?".
   

     <div class="content-text">
          <h2><?php the_title(); ?></h2>
          <?php
          ob_start();
          the_content('Read the full post',true);
          $postOutput = preg_replace('/<img[^>]+./','', ob_get_contents());
          ob_end_clean();
          echo $postOutput;
          ?>
        </div>
        <div class="content-img">
          <?php
          preg_match_all("/(<img [^>]*>)/", get_the_content(),$matches,PREG_PATTERN_ORDER);
          for( $i=0; isset($matches[1]) && $i < count($matches[1]); $i++ ) {
            echo $beforeEachImage . $matches[1][$i] . $afterEachImage;}?>
        </div>

