Notepad++ Search and Replace: delete all after "/" in each row

Search for: /.*, replace with nothing.

The character / matches just /. ., however, matches any character except newlines, so .* will match a sequence of characters up until the first newline. You can find a demonstration here: http://regex101.com/r/kT0uE3.

If you want to remove characters only after the last on the line /, you should use the regex /[^/]*$. You can find an explanation and demonstration here: https://regex101.com/r/sZ6kP7/74.


In regular expression mode

Find:

/.* 

Replace:

(empty)