'Regular expression to leave part of the text

I have a file from which i need (in any text editor) to remove all lines except those starting with certain characters: [EXA-MPLE] and remove the time.

The content of the document is:

[10:00:00] Hello
[10:00:01] [EXA-MPLE] Test
[10:00:02] [EXA-MPLE] 123
[10:00:03] 567
[10:00:04] Test

I only need to leave this in the document w/o time:

[EXA-MPLE] Test
[EXA-MPLE] 123

Thanks!



Solution 1:[1]

Hope this works.

(?[EXA-MPLE].*)

Answer

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ayush2810