@
dbw9580 ```
import re
text = """
LTOPOALG: ### got the S1 jump, sline 36, ts 1594566036, mbox mt-000000001004
LTOPOALG: mt-000000001012 [0 0]: 2485 2485 [ 2485 2485 2485 2485 ] 2485 2485
LTOPOALG: mt-000000001016 [0 0]: 50758 50752 [ 50746 50740 50734 50728 ] 50722 50716
LTOPOALG: mt-000000001010 [0 0]: 3477 3477 [ 3477 3477 3477 3477 ] 3477 3477
LTOPOALG: mt-000000001011 [0 0]: 55265 55263 [ 55261 55259 55257 55255 ] 55253 55251
LTOPOALG: mt-000000001014 [0 0]: 555 555 [ 555 555 555 555 ] 555 555
LTOPOALG: mt-000000001013 [0 0]: 793 792 [ 791 790 789 788 ] 787 786
LTOPOALG: mt-000000001015 [0 0]: 2053 2053 [ 2053 2053 2053 2053 ] 2053 2053
LTOPOALG: mt-000000001009 [0 0]: 348 354 [ 360 366 372 378 ] 384 390
LTOPOALG: mt-000000001007 [0 0]: 99 99 [ 99 99 99 99 ] 99 99
LTOPOALG: mt-000000001002 [0 0]: 3442 3442 [ 3442 3442 3442 3442 ] 3442 3442
LTOPOALG: mt-000000001006 [0 0]: 152 152 [ 152 152 152 152 ] 152 152
LTOPOALG: mt-000000001018 [0 0]: 1382 1396 [ 1410 1424 1438 1452 ] 1466 1480
LTOPOALG: mt-000000001017 [0 0]: 6699 6681 [ 6663 6645 6627 6609 ] 6591 6573
LTOPOALG: mt-000000001004 [0 1]: 25831 25852 [ 25852 21595 5897 4851 ] 4847 4849
LTOPOALG: mt-000000001008 [0 0]: 89 89 [ 89 89 89 89 ] 89 89
LTOPOALG: bt-000000001001-1 [0 0]: 0 0 [ 0 0 0 0 ] 0 0
LTOPOALG: bt-000000001005-1 [0 0]: 0 0 [ 0 0 0 0 ] 0 0
LTOPOALG: bt-000000001003-1 [0 0]: 0 0 [ 0 0 0 0 ] 0 0
LTOPOALG: bt-000000001020-1 [0 0]: 0 0 [ 0 0 0 0 ] 0 0
LTOPOALG: bt-000000001001-2 [0 0]: 3522 3522 [ 3522 3522 3522 3522 ] 3522 3522
LTOPOALG: bt-000000001005-2 [0 0]: 34861 34865 [ 34889 34845 18830 13368 ] 13376 13395
LTOPOALG: bt-000000001003-2 [0 0]: 302 306 [ 310 314 318 322 ] 326 330
LTOPOALG: bt-000000001020-2 [0 0]: 119 119 [ 119 119 119 119 ] 119 119
LTOPOALG: bt-000000001001-3 [0 0]: 55414 55412 [ 55410 55408 55406 55404 ] 55402 55400
LTOPOALG: bt-000000001020-3 [0 0]: 7339 7337 [ 7335 7333 7331 7329 ] 7327 7325
LTOPOALG: bt-000000001003-3 [0 0]: 2357 2357 [ 2357 2357 2357 2357 ] 2357 2357
LTOPOALG: bt-000000001005-3 [0 0]: 3684 3685 [ 3686 3687 3688 3689 ] 3690 3691
LTOPOALG: bt-000000001020-4 [0 0]: 956 958 [ 960 962 964 966 ] 968 970
LTOPOALG: bt-000000001001-4 [0 0]: 50406 50405 [ 50404 50403 50402 50401 ] 50400 50399
LTOPOALG: bt-000000001003-4 [0 0]: 403 403 [ 403 403 403 403 ] 403 403
LTOPOALG: bt-000000001005-4 [0 0]: 7499 7505 [ 7511 7517 7523 7529 ] 7535 7541
LTOPOALG: bt-000000001003-5 [0 0]: 817 816 [ 815 814 813 812 ] 811 810
LTOPOALG: bt-000000001020-5 [0 0]: 25925 25949 [ 25947 25955 6115 4841 ] 4835 4847
LTOPOALG: bt-000000001001-5 [0 0]: 2304 2304 [ 2304 2304 2304 2304 ] 2304 2304
LTOPOALG: bt-000000001005-5 [0 0]: 113987 -1 [ -1 -1 113612 113682 ] 113752 113822
LTOPOALG: **ltopo_alg_proc_s1_jump, got the SINGLE jump, sline 36, box 000000001004, father 000000000522
LTOPOALG: gen ev mt-000000001004
"""
regex = "^.*###.*\n(.*(mt).*\n)+"
for i in re.findall(regex, text, re.M):
print('-' * 20)
print(i)
```
问下我这么写的代码, 为什么匹配到的结果。
是这样
> ('LTOPOALG: mt-000000001008 [0 0]: 89 89 [ 89 89 89 89 ] 89 89\n', 'mt')