如图所示的str,我想要从中提取出划灰色线部分的内容(1.去掉红色箭头所指向的-a/-c以及后面的内容;2.去掉如local/master/xlty/adve参数;3.去掉前面的数字以及数字前的字符)
如果以数字前的特殊字符(就是蓝色箭头指的部分)来匹配,忽略掉特殊字符后的数字和一个空格,拿到画灰色线的部分,然后再一个空格,忽略掉后面的local/xlty/-c,然后提取下一行的灰色线内容(从3105~2094117),那么我的正则表达式该如何写
最后我想得到这样的一个列表
str = '''
● xr.service - command component for autoewqt xr
Loaded: loaded (/lib/systemd/system/xr.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-01-17 22:46:43 CST; 4s ago
Process: 3104 ExecStartPre=/etc/profile.d/fault_tolerant.sh (code=exited, status=0/SUCCESS)
Main PID: 3105 (xr_esagdshreman)
Tasks: 37 (limit: 29371)
Memory: 32.2M
CGroup: /system.slice/xr.service
├─3105 /work/uysoaf/platform/xr/sbin/qa_esagdshremanager -a /work/uysoaf/platform/xr/opt -m /work/uysoaf/platform/xr/etc/machine_exec_config.json -l /work/uysoaf/platform/xr/etc/logging_config.json
├─3107 xr_someip_daemon -c ./etc/someipd-posix.json
├─3108 mcu_dds_adxrter
├─2094095 xr_sm_proxy local
├─2094097 xr_health_manager_daemon master
├─2094099 cfg_server_node xlty
├─2094106 mu_fault_manager adve
├─2094108 mt_collector
├─2094115 log_agent
└─2094117 xr_watch_dog
Jan 17 22:46:44 tegra-ubuntu xr_esagdshremanager[3108]: [INFO] [1642430804.345211908] [ayufyusa_ruresd_iuhsgiuahiua_b]: sub topic:/om/fault_collect is online in node:/ayufyusa_ruresd_iuhsgiuahiua_b
Jan 17 22:46:44 tegra-ubuntu xr_esagdshremanager[3108]: ======================================Start===================================
Jan 17 22:46:45 tegra-ubuntu xr_esagdshremanager[3108]: [INFO] [1642430805.346131548] [ayufyusa_ruresd_iuhsgiuahiua_b]: pub topic:/om/ayufyusab_fault_report is online in node:/faultclient_mcu_dds_adxrter
'''