def filter_requirement_statements(req):
 req_pattern = re.compile(u'^\\s*([^\\#]+)')
 m = req_pattern.search(req)
 if m:
  return m.group(0).replace(u' ', u'')

def filter_requirement_statements ( req ) : req_pattern = re . compile ( u'^\\s*([^\\#]+)' ) m = req_pattern . search ( req ) if m : return m . group ( 0 ) . replace ( u' ' , u'' )
filter comments and blank lines from a requirements .