fork(1) download
  1. import re
  2. answer = """
  3. models sold in last 4 weeks
  4. +---------------+
  5. | pcid |
  6. +---------------+
  7. | 22bv03 |
  8. | 3eer3d |
  9. | fes44h2j555j |
  10. | 4mee33ikj5sq1 |
  11. | 99dkk3bvr32a |
  12. | cv44trmq011sa |
  13. | lo33xc1a |
  14. +---------------+***For more information, please visit the company page.
  15. """
  16. sep = '+---------------+'
  17. m = re.search(r'(?sm)^{0}.*{0}'.format(re.escape(sep)), answer)
  18. if m:
  19. print(m.group())
Success #stdin #stdout 0.03s 9424KB
stdin
Standard input is empty
stdout
+---------------+
|      pcid     |
+---------------+
|     22bv03    |
|     3eer3d    |
|  fes44h2j555j |
| 4mee33ikj5sq1 |
|  99dkk3bvr32a |
| cv44trmq011sa |
|    lo33xc1a   |
+---------------+