I would like to remove everything before a string 'EXEC'. How to do that in Notepad++?
There are many examples with regular expressions and special characters but my sentence has two EXEC so none of them solved my problem. I want to ignore EXECUTION and remove everything before EXEC.
Example:
Abcdefghijklmn EXECUTION EXEC myfilename here
Expected Result:
EXEC myfilename here
Try this Regex:
^.*(?=EXEC\s)
Click for Demo
Explanation:
^
- Start of the String.*
- 0+ occurrences of any character which is not a newline character(?=EXEC\s)
- Positive lookahead which returns the position which is immediately followed by EXEC
(with a space)OUTPUT:
Before replacing:
After replacing:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With