Accurate extractions of the detected gravitational wave (GW) signal waveforms are essential to validate a detection and to probe the astrophysics behind the sources producing the GWs. This however could be difficult in realistic scenarios where the signals detected by existing GW detectors could be contaminated with nonstationary and non-Gaussian noise. While the performance of existing waveform extraction methods are optimal, they are not fast enough for online application, which is important for multimessenger astronomy. In this paper, we demonstrate that a deep learning architecture consisting of convolutional neural network and bidirectional long short-term memory components can be used to extract binary black hole (BBH) GW waveforms from realistic noise in a few milliseconds. We have tested our network systematically on injected GW signals, with component masses uniformly distributed in the range of 10 to 80 M⊙, on Gaussian noise and Laser Interferometer Gravitational Wave Observatory (LIGO) detector noise. We find that our model can extract GW waveforms with overlaps of more than 0.95 with pure numerical relativity templates for signals with signal-to-noise ratio greater than six and is also robust against interfering "glitches". We then apply our model to all ten detected BBH events from LIGO-Virgo's first (O1) and second (O2) observation runs, obtaining ≥0.97 overlaps for all ten extracted BBH waveforms with the corresponding pure templates. We discuss the implication of our result and its future applications to GW localization and mass estimation.