Find & Replace question with RegEx solution
-
I have a URL that is like so:
https://preview.redd.it/7zssyhn54gxa1.jpg?blah_blah
I need the word ‘preview’ replaced with the letter i (lowercase I). And then everything after the ? replaced with nothing. Actually I need the question mark to be deleted as well.
This is the end result I need:
https://i.redd.it/7zssyhn54gxa1.jpg
Fixing just 1 URL like this would be very simple but I have multiple URLs with this pattern. They are all on separate lines. I’d appreciate any help I can get.
—
moderator added code markdown around text; please don’t forget to use the
</>
button to mark example text as “code” so that characters don’t get changed by the forum -
I did some googling and found a RegEx solution:
Find:
\?.*$
Replace with:
(null)