title: Apply a Regex on Stream?
body: <p>I'm searching for fast and safe way to apply Regular Expressions on Streams.</p>
  
  <p>I found some examples over the internet that talking about converting each buffer to String and then apply the <code>Regex</code> on the string.</p>
  
  <p>This approach have two problems:</p>
  
  <ul>
  <li>Performance: converting to strings and GC'ing the strings is waste of time and CPU and sure can be avoided if there was a more native way to apply <code>Regex</code> on Streams.</li>
  <li>Pure <code>Regex</code> support: <code>Regex</code> pattern sometimes can match only if combining two buffers together (buffer 1 ends with the first part of the match, and buffer 2 starts with the second part of the match). The convert-to-string way cannot handle this type of matching natively, I have to provide more information like the maximum length that the pattern can match, this does not support the + and * regex signs at all and will never support (unlimited match length).</li>
  </ul>
  
  <p>So, the convert-to-string way is not fast, and doesn't fully support <code>Regex</code>.</p>
  
  <p>Is there any way / Library that can be used to apply <code>Regex</code> on Streams without converting to strings and with full Regex support?</p>