# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r" (MEmu.*)[\n\w\W]*?NIC 1 Rule\(0\): name = ADB, protocol = tcp, host ip = (127\.0\.0\.1), host port = (\d{5})"
test_str = ("Name: MEmu\n"
"Groups: /\n"
"Guest OS: Other Linux (32-bit)\n"
"UUID: 20201029-aaaa-aaaa-aaaa-000000000000\n"
"Config file: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu\\MEmu.memu\n"
"Snapshot folder: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu\\Snapshots\n"
"Log folder: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu\\Logs\n"
"Hardware UUID: 20201029-aaaa-aaaa-aaaa-000000000000\n"
"Memory size: 512MB\n"
"Page Fusion: off\n"
"VRAM size: 12MB\n"
"CPU exec cap: 100%\n"
"HPET: off\n"
"Chipset: piix3\n"
"Firmware: BIOS\n"
"Number of CPUs: 1\n"
"PAE: on\n"
"Long Mode: on\n"
"Triple Fault Reset: off\n"
"APIC: on\n"
"X2APIC: off\n"
"CPUID Portability Level: 0\n"
"CPUID overrides: None\n"
"Boot menu mode: disabled\n"
"Boot Device (1): HardDisk\n"
"Boot Device (2): Not Assigned\n"
"Boot Device (3): Not Assigned\n"
"Boot Device (4): Not Assigned\n"
"ACPI: on\n"
"IOAPIC: on\n"
"BIOS APIC mode: APIC\n"
"Time offset: 0ms\n"
"RTC: UTC\n"
"Hardw. virt.ext: on\n"
"Nested Paging: on\n"
"Large Pages: on\n"
"VT-x VPID: on\n"
"VT-x unr. exec.: on\n"
"Paravirt. Provider: Legacy\n"
"Effective Paravirt. Provider: None\n"
"State: running (since 2020-11-15T14:31:01.762000000)\n"
"Monitor count: 1\n"
"3D Acceleration: off\n"
"2D Video Acceleration: off\n"
"Teleporter Enabled: off\n"
"Teleporter Port: 0\n"
"Teleporter Address: \n"
"Teleporter Password: \n"
"Tracing Enabled: off\n"
"Allow Tracing to Access VM: off\n"
"Tracing Configuration: \n"
"Autostart Enabled: off\n"
"Autostart Delay: 0\n"
"Default Frontend: \n"
"Storage Controller Name (0): IDE\n"
"Storage Controller Type (0): PIIX4\n"
"Storage Controller Instance Number (0): 0\n"
"Storage Controller Max Port Count (0): 2\n"
"Storage Controller Port Count (0): 2\n"
"Storage Controller Bootable (0): on\n"
"IDE (0, 0): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu\\MEmu44-20180125000000FF-disk1.vmdk (UUID: 3c18861c-afbc-4dc5-a282-9e28e6d979d9)\n"
"IDE (0, 1): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu\\MEmu44-20180125000000FF-disk2.vmdk (UUID: 20201029-cccc-cccc-cccc-000000000000)\n"
"IDE (1, 0): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu\\MEmu44-20180125000000FF-disk3.vmdk (UUID: 20201029-dddd-dddd-dddd-000000000000)\n"
"NIC 1: MAC: 08002709FE9E, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none\n"
"NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)\n"
"NIC 1 Rule(0): name = ADB, protocol = tcp, host ip = 127.0.0.1, host port = 21503, guest ip = 10.0.2.15, guest port = 5555\n"
"NIC 1 Rule(1): name = MVD, protocol = tcp, host ip = 127.0.0.1, host port = 21501, guest ip = 10.0.2.15, guest port = 21501\n"
"NIC 2: MAC: 0800279FCBC1, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none\n"
"NIC 2 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)\n"
"NIC 3: disabled\n"
"NIC 4: disabled\n"
"NIC 5: disabled\n"
"NIC 6: disabled\n"
"NIC 7: disabled\n"
"NIC 8: disabled\n"
"Pointing Device: USB Tablet\n"
"Keyboard Device: PS/2 Keyboard\n"
"UART 1: disabled\n"
"UART 2: disabled\n"
"UART 3: disabled\n"
"UART 4: disabled\n"
"LPT 1: disabled\n"
"LPT 2: disabled\n"
"Audio: enabled (Driver: Null, Controller: AC97, Codec: STAC9700)\n"
"Clipboard Mode: disabled\n"
"Drag and drop Mode: disabled\n"
"Session name: headless\n"
"VRDE: disabled\n"
"USB: enabled\n"
"EHCI: disabled\n"
"XHCI: disabled\n\n"
"USB Device Filters:\n\n"
"<none>\n\n"
"Bandwidth groups: <none>\n\n"
"Shared folders: \n\n"
"Name: 'music', Host path: 'C:\\Users\\яЕПЦЕИ\\Music\\MEmu Music' (machine mapping), writable\n"
"Name: 'movie', Host path: 'C:\\Users\\яЕПЦЕИ\\Videos\\MEmu Video' (machine mapping), writable\n"
"Name: 'picture', Host path: 'C:\\Users\\яЕПЦЕИ\\Pictures\\MEmu Photo' (machine mapping), writable\n"
"Name: 'download', Host path: 'C:\\Users\\яЕПЦЕИ\\Downloads\\MEmu Download' (machine mapping), writable\n\n"
"Video capturing: not active\n"
"Capture screens: 0\n"
"Capture file: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu\\MEmu.webm\n"
"Capture dimensions: 1024x768\n"
"Capture rate: 512 kbps\n"
"Capture FPS: 25\n\n"
"Guest:\n\n"
"Configured memory balloon size: 0 MB\n\n\n"
"Name: MEmu_1\n"
"Groups: /\n"
"Guest OS: Other Linux (32-bit)\n"
"UUID: 20201112-aaaa-aaaa-aaaa-000000000001\n"
"Config file: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_1\\MEmu_1.memu\n"
"Snapshot folder: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_1\\Snapshots\n"
"Log folder: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_1\\Logs\n"
"Hardware UUID: 20201112-aaaa-aaaa-aaaa-000000000001\n"
"Memory size: 512MB\n"
"Page Fusion: off\n"
"VRAM size: 12MB\n"
"CPU exec cap: 100%\n"
"HPET: off\n"
"Chipset: piix3\n"
"Firmware: BIOS\n"
"Number of CPUs: 1\n"
"PAE: on\n"
"Long Mode: on\n"
"Triple Fault Reset: off\n"
"APIC: on\n"
"X2APIC: off\n"
"CPUID Portability Level: 0\n"
"CPUID overrides: None\n"
"Boot menu mode: disabled\n"
"Boot Device (1): HardDisk\n"
"Boot Device (2): Not Assigned\n"
"Boot Device (3): Not Assigned\n"
"Boot Device (4): Not Assigned\n"
"ACPI: on\n"
"IOAPIC: on\n"
"BIOS APIC mode: APIC\n"
"Time offset: 0ms\n"
"RTC: UTC\n"
"Hardw. virt.ext: on\n"
"Nested Paging: on\n"
"Large Pages: on\n"
"VT-x VPID: on\n"
"VT-x unr. exec.: on\n"
"Paravirt. Provider: Legacy\n"
"Effective Paravirt. Provider: None\n"
"State: running (since 2020-11-15T14:31:02.670000000)\n"
"Monitor count: 1\n"
"3D Acceleration: off\n"
"2D Video Acceleration: off\n"
"Teleporter Enabled: off\n"
"Teleporter Port: 0\n"
"Teleporter Address: \n"
"Teleporter Password: \n"
"Tracing Enabled: off\n"
"Allow Tracing to Access VM: off\n"
"Tracing Configuration: \n"
"Autostart Enabled: off\n"
"Autostart Delay: 0\n"
"Default Frontend: \n"
"Storage Controller Name (0): IDE\n"
"Storage Controller Type (0): PIIX4\n"
"Storage Controller Instance Number (0): 0\n"
"Storage Controller Max Port Count (0): 2\n"
"Storage Controller Port Count (0): 2\n"
"Storage Controller Bootable (0): on\n"
"IDE (0, 0): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_1\\MEmu44-20180125000000FF-disk1.vmdk (UUID: 20201112-bbbb-bbbb-bbbb-000000000001)\n"
"IDE (0, 1): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_1\\MEmu44-20180125000000FF-disk2.vmdk (UUID: 20201112-cccc-cccc-cccc-000000000001)\n"
"IDE (1, 0): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_1\\MEmu44-20180125000000FF-disk3.vmdk (UUID: 20201112-dddd-dddd-dddd-000000000001)\n"
"NIC 1: MAC: 360828098894, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none\n"
"NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)\n"
"NIC 1 Rule(0): name = ADB, protocol = tcp, host ip = 127.0.0.1, host port = 21513, guest ip = 10.0.2.15, guest port = 5555\n"
"NIC 1 Rule(1): name = MVD, protocol = tcp, host ip = 127.0.0.1, host port = 21511, guest ip = 10.0.2.15, guest port = 21501\n"
"NIC 2: MAC: A8F6B0302130, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none\n"
"NIC 2 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)\n"
"NIC 3: disabled\n"
"NIC 4: disabled\n"
"NIC 5: disabled\n"
"NIC 6: disabled\n"
"NIC 7: disabled\n"
"NIC 8: disabled\n"
"Pointing Device: USB Tablet\n"
"Keyboard Device: PS/2 Keyboard\n"
"UART 1: disabled\n"
"UART 2: disabled\n"
"UART 3: disabled\n"
"UART 4: disabled\n"
"LPT 1: disabled\n"
"LPT 2: disabled\n"
"Audio: enabled (Driver: Null, Controller: AC97, Codec: STAC9700)\n"
"Clipboard Mode: disabled\n"
"Drag and drop Mode: disabled\n"
"Session name: headless\n"
"VRDE: disabled\n"
"USB: enabled\n"
"EHCI: disabled\n"
"XHCI: disabled\n\n"
"USB Device Filters:\n\n"
"<none>\n\n"
"Bandwidth groups: <none>\n\n"
"Shared folders: \n\n"
"Name: 'music', Host path: 'C:\\Users\\яЕПЦЕИ\\Music\\MEmu Music' (machine mapping), writable\n"
"Name: 'movie', Host path: 'C:\\Users\\яЕПЦЕИ\\Videos\\MEmu Video' (machine mapping), writable\n"
"Name: 'picture', Host path: 'C:\\Users\\яЕПЦЕИ\\Pictures\\MEmu Photo' (machine mapping), writable\n"
"Name: 'download', Host path: 'C:\\Users\\яЕПЦЕИ\\Downloads\\MEmu Download' (machine mapping), writable\n\n"
"Video capturing: not active\n"
"Capture screens: 0\n"
"Capture file: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_1\\MEmu_1.webm\n"
"Capture dimensions: 1024x768\n"
"Capture rate: 512 kbps\n"
"Capture FPS: 25\n\n"
"Guest:\n\n"
"Configured memory balloon size: 0 MB\n\n\n"
"Name: MEmu_2\n"
"Groups: /\n"
"Guest OS: Other Linux (32-bit)\n"
"UUID: 20201112-aaaa-aaaa-aaaa-000000000002\n"
"Config file: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_2\\MEmu_2.memu\n"
"Snapshot folder: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_2\\Snapshots\n"
"Log folder: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_2\\Logs\n"
"Hardware UUID: 20201112-aaaa-aaaa-aaaa-000000000002\n"
"Memory size: 512MB\n"
"Page Fusion: off\n"
"VRAM size: 12MB\n"
"CPU exec cap: 100%\n"
"HPET: off\n"
"Chipset: piix3\n"
"Firmware: BIOS\n"
"Number of CPUs: 1\n"
"PAE: on\n"
"Long Mode: on\n"
"Triple Fault Reset: off\n"
"APIC: on\n"
"X2APIC: off\n"
"CPUID Portability Level: 0\n"
"CPUID overrides: None\n"
"Boot menu mode: disabled\n"
"Boot Device (1): HardDisk\n"
"Boot Device (2): Not Assigned\n"
"Boot Device (3): Not Assigned\n"
"Boot Device (4): Not Assigned\n"
"ACPI: on\n"
"IOAPIC: on\n"
"BIOS APIC mode: APIC\n"
"Time offset: 0ms\n"
"RTC: UTC\n"
"Hardw. virt.ext: on\n"
"Nested Paging: on\n"
"Large Pages: on\n"
"VT-x VPID: on\n"
"VT-x unr. exec.: on\n"
"Paravirt. Provider: Legacy\n"
"Effective Paravirt. Provider: None\n"
"State: running (since 2020-11-15T14:31:04.475000000)\n"
"Monitor count: 1\n"
"3D Acceleration: off\n"
"2D Video Acceleration: off\n"
"Teleporter Enabled: off\n"
"Teleporter Port: 0\n"
"Teleporter Address: \n"
"Teleporter Password: \n"
"Tracing Enabled: off\n"
"Allow Tracing to Access VM: off\n"
"Tracing Configuration: \n"
"Autostart Enabled: off\n"
"Autostart Delay: 0\n"
"Default Frontend: \n"
"Storage Controller Name (0): IDE\n"
"Storage Controller Type (0): PIIX4\n"
"Storage Controller Instance Number (0): 0\n"
"Storage Controller Max Port Count (0): 2\n"
"Storage Controller Port Count (0): 2\n"
"Storage Controller Bootable (0): on\n"
"IDE (0, 0): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_2\\MEmu44-20180125000000FF-disk1.vmdk (UUID: 20201112-bbbb-bbbb-bbbb-000000000002)\n"
"IDE (0, 1): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_2\\MEmu44-20180125000000FF-disk2.vmdk (UUID: 20201112-cccc-cccc-cccc-000000000002)\n"
"IDE (1, 0): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_2\\MEmu44-20180125000000FF-disk3.vmdk (UUID: 20201112-dddd-dddd-dddd-000000000002)\n"
"NIC 1: MAC: 445929981808, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none\n"
"NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)\n"
"NIC 1 Rule(0): name = ADB, protocol = tcp, host ip = 127.0.0.1, host port = 21523, guest ip = 10.0.2.15, guest port = 5555\n"
"NIC 1 Rule(1): name = MVD, protocol = tcp, host ip = 127.0.0.1, host port = 21521, guest ip = 10.0.2.15, guest port = 21501\n"
"NIC 2: MAC: A8F5E2EBF25D, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none\n"
"NIC 2 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)\n"
"NIC 3: disabled\n"
"NIC 4: disabled\n"
"NIC 5: disabled\n"
"NIC 6: disabled\n"
"NIC 7: disabled\n"
"NIC 8: disabled\n"
"Pointing Device: USB Tablet\n"
"Keyboard Device: PS/2 Keyboard\n"
"UART 1: disabled\n"
"UART 2: disabled\n"
"UART 3: disabled\n"
"UART 4: disabled\n"
"LPT 1: disabled\n"
"LPT 2: disabled\n"
"Audio: enabled (Driver: Null, Controller: AC97, Codec: STAC9700)\n"
"Clipboard Mode: disabled\n"
"Drag and drop Mode: disabled\n"
"Session name: headless\n"
"VRDE: disabled\n"
"USB: enabled\n"
"EHCI: disabled\n"
"XHCI: disabled\n\n"
"USB Device Filters:\n\n"
"<none>\n\n"
"Bandwidth groups: <none>\n\n"
"Shared folders: \n\n"
"Name: 'music', Host path: 'C:\\Users\\яЕПЦЕИ\\Music\\MEmu Music' (machine mapping), writable\n"
"Name: 'movie', Host path: 'C:\\Users\\яЕПЦЕИ\\Videos\\MEmu Video' (machine mapping), writable\n"
"Name: 'picture', Host path: 'C:\\Users\\яЕПЦЕИ\\Pictures\\MEmu Photo' (machine mapping), writable\n"
"Name: 'download', Host path: 'C:\\Users\\яЕПЦЕИ\\Downloads\\MEmu Download' (machine mapping), writable\n\n"
"Video capturing: not active\n"
"Capture screens: 0\n"
"Capture file: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_2\\MEmu_2.webm\n"
"Capture dimensions: 1024x768\n"
"Capture rate: 512 kbps\n"
"Capture FPS: 25\n\n"
"Guest:\n\n"
"Configured memory balloon size: 0 MB\n\n\n"
"Name: MEmu_3\n"
"Groups: /\n"
"Guest OS: Other Linux (32-bit)\n"
"UUID: 20201112-aaaa-aaaa-aaaa-000000000003\n"
"Config file: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_3\\MEmu_3.memu\n"
"Snapshot folder: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_3\\Snapshots\n"
"Log folder: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_3\\Logs\n"
"Hardware UUID: 20201112-aaaa-aaaa-aaaa-000000000003\n"
"Memory size: 512MB\n"
"Page Fusion: off\n"
"VRAM size: 12MB\n"
"CPU exec cap: 100%\n"
"HPET: off\n"
"Chipset: piix3\n"
"Firmware: BIOS\n"
"Number of CPUs: 1\n"
"PAE: on\n"
"Long Mode: on\n"
"Triple Fault Reset: off\n"
"APIC: on\n"
"X2APIC: off\n"
"CPUID Portability Level: 0\n"
"CPUID overrides: None\n"
"Boot menu mode: disabled\n"
"Boot Device (1): HardDisk\n"
"Boot Device (2): Not Assigned\n"
"Boot Device (3): Not Assigned\n"
"Boot Device (4): Not Assigned\n"
"ACPI: on\n"
"IOAPIC: on\n"
"BIOS APIC mode: APIC\n"
"Time offset: 0ms\n"
"RTC: UTC\n"
"Hardw. virt.ext: on\n"
"Nested Paging: on\n"
"Large Pages: on\n"
"VT-x VPID: on\n"
"VT-x unr. exec.: on\n"
"Paravirt. Provider: Legacy\n"
"Effective Paravirt. Provider: None\n"
"State: running (since 2020-11-15T14:31:04.475000000)\n"
"Monitor count: 1\n"
"3D Acceleration: off\n"
"2D Video Acceleration: off\n"
"Teleporter Enabled: off\n"
"Teleporter Port: 0\n"
"Teleporter Address: \n"
"Teleporter Password: \n"
"Tracing Enabled: off\n"
"Allow Tracing to Access VM: off\n"
"Tracing Configuration: \n"
"Autostart Enabled: off\n"
"Autostart Delay: 0\n"
"Default Frontend: \n"
"Storage Controller Name (0): IDE\n"
"Storage Controller Type (0): PIIX4\n"
"Storage Controller Instance Number (0): 0\n"
"Storage Controller Max Port Count (0): 2\n"
"Storage Controller Port Count (0): 2\n"
"Storage Controller Bootable (0): on\n"
"IDE (0, 0): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_3\\MEmu44-20180125000000FF-disk1.vmdk (UUID: 20201112-bbbb-bbbb-bbbb-000000000003)\n"
"IDE (0, 1): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_3\\MEmu44-20180125000000FF-disk2.vmdk (UUID: 20201112-cccc-cccc-cccc-000000000003)\n"
"IDE (1, 0): C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_3\\MEmu44-20180125000000FF-disk3.vmdk (UUID: 20201112-dddd-dddd-dddd-000000000003)\n"
"NIC 1: MAC: 366807061729, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none\n"
"NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)\n"
"NIC 1 Rule(0): name = ADB, protocol = tcp, host ip = 127.0.0.1, host port = 21533, guest ip = 10.0.2.15, guest port = 5555\n"
"NIC 1 Rule(1): name = MVD, protocol = tcp, host ip = 127.0.0.1, host port = 21531, guest ip = 10.0.2.15, guest port = 21501\n"
"NIC 2: MAC: 70A31C00CB3E, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: virtio, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none\n"
"NIC 2 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)\n"
"NIC 3: disabled\n"
"NIC 4: disabled\n"
"NIC 5: disabled\n"
"NIC 6: disabled\n"
"NIC 7: disabled\n"
"NIC 8: disabled\n"
"Pointing Device: USB Tablet\n"
"Keyboard Device: PS/2 Keyboard\n"
"UART 1: disabled\n"
"UART 2: disabled\n"
"UART 3: disabled\n"
"UART 4: disabled\n"
"LPT 1: disabled\n"
"LPT 2: disabled\n"
"Audio: enabled (Driver: Null, Controller: AC97, Codec: STAC9700)\n"
"Clipboard Mode: disabled\n"
"Drag and drop Mode: disabled\n"
"Session name: headless\n"
"VRDE: disabled\n"
"USB: enabled\n"
"EHCI: disabled\n"
"XHCI: disabled\n\n"
"USB Device Filters:\n\n"
"<none>\n\n"
"Bandwidth groups: <none>\n\n"
"Shared folders: \n\n"
"Name: 'music', Host path: 'C:\\Users\\яЕПЦЕИ\\Music\\MEmu Music' (machine mapping), writable\n"
"Name: 'movie', Host path: 'C:\\Users\\яЕПЦЕИ\\Videos\\MEmu Video' (machine mapping), writable\n"
"Name: 'picture', Host path: 'C:\\Users\\яЕПЦЕИ\\Pictures\\MEmu Photo' (machine mapping), writable\n"
"Name: 'download', Host path: 'C:\\Users\\яЕПЦЕИ\\Downloads\\MEmu Download' (machine mapping), writable\n\n"
"Video capturing: not active\n"
"Capture screens: 0\n"
"Capture file: C:\\Program Files\\Microvirt\\MEmu\\MemuHyperv VMs\\MEmu_3\\MEmu_3.webm\n"
"Capture dimensions: 1024x768\n"
"Capture rate: 512 kbps\n"
"Capture FPS: 25\n\n"
"Guest:\n\n"
"Configured memory balloon size: 0 MB")
matches = re.finditer(regex, test_str, re.MULTILINE)
for matchNum, match in enumerate(matches, start=1):
print ("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))
for groupNum in range(0, len(match.groups())):
groupNum = groupNum + 1
print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html