Reputation: 159
I am looking for the way to delete part of the line, but there is some text static, which doesn`t change. Example:
http://example1.com/index.php?static=bread&dasd
http://example2.com/?static=oil&gas&check
So I want to remove &dasd
from the first line and &gas&check
the from second line. I have thousands of lines of this and found some difficulties, as the domain and string after static=
can contain different number of characters. In addition, different number of characters can come before the &
sign.
Upvotes: 0
Views: 46
Reputation: 369494
You can use capturing group and backreference.
Find what:
(static=[^&]*).*
Replace with:
\1
Upvotes: 2