TECHNOLOGY FOCUS - INSTRUMENTATION AND TESTING - Preferred Components: The second permeate stream and the third retentate stream are conducted at the suction side of the compressor for reprocessing. The compressor is a multistage compressor. The second permeate stream and/or the third retentate stream are introduced into the compressor between two compression units. The first retentate stream, the second retentate stream and/or the third retentate stream are conducted by a pressure regulating valve. The gas separation membrane module with a mixed gas selectivity of at least 35, preferably at least 45 is used in at least one of the membrane separating units. The device comprises at least one gas separation membrane module in at least one of the membrane separating units, which are parallely and/or serially connected. The gas separation membrane module comprises hollow fiber membranes and/or flat sheet membranes. The retentate component (at least 95%, preferably at least 99.5%) of the feed stream separating unit, which is introduced with the crude gas stream into the device, is discharged over the second retentate stream. The retentate component ( not greater than 5%, preferably not greater than 0.5%) of the feed stream separating unit, which is introduced with the crude gas stream into the device, is discharged over the third permeate stream. The pressure of the permeate side of the feed stream separating unit is adjusted to 1-30 bars, preferably 3-10 bars, using a pressure regulating valve present at the retentate side of the permeate separating unit. The pressure of the first and the second retentate streams is adjusted to 1-100 bars, preferably 10-70 bars, using a pressure regulating valve in the second retentate stream. The driving force for the separation task comprises a partial pressure difference between the retentate- and the permeate side in the respective membrane separation units, where the partial pressure difference is generated by a compressor in the feed stream, by a vacuum pump in the second and/or third permeate stream and/or by a permeate side of flushing gas stream. The pressure of the permeate of the feed stream separating unit is same or increased with respect to the ambient pressure, so that a partial pressure difference exists between the retentate and the permeate of the permeate separating unit, and thus a driving force is given when the permeate of the permeate separating unit is applied with ambient pressure or negative pressure.    TECHNOLOGY FOCUS - ORGANIC CHEMISTRY - Preferred Components: The gas mixture comprises carbon dioxide and methane, hydrogen and methane, carbon monoxide and hydrogen, raw biogas or raw natural gas.    TECHNOLOGY FOCUS - POLYMERS - Preferred Components: The material for active separation layer of the membranes comprises amorphous or partially crystalline plastics e.g. polyimide, polyamide, polysulfone, cellulose acetate or its derivatives, polyphenylene oxide, polysiloxane, polymers with intrinsic microporosity, mixed matrix membranes, facilitated transport membranes, polyethylene oxide and/or polypropylene oxide. The material for active separation layer of the membranes comprises a polyimide of the formula (I).R = 1,3,5-trimethyl-benzene-2,4-diyl, 1-methyl-benzene-2,4-diyl, 2-methyl-benzene-1,3-diyl or 4-(benzene-4-yl)benzene-1-yl;x = greater than 0-less than 0.5;y = less than 1-greater than 0.5; andn = not defined. EXAMPLE - No suitable example given.