When every line shares the same leading marker, removing it one line at a time is tedious.
Remove Prefix from Lines deletes a prefix string from the start of each line that has it.
How to use Remove Prefix from Lines
- Paste the lines you want to clean into the input box.
- Type the prefix to remove, and Remove Prefix from Lines deletes it from the start of matching lines.
- Copy the cleaned lines, or download them as a text file.
Use cases
- Removing a comment marker from the front of each line.
- Stripping a repeated tag that prefixes every line.
- Deleting a leading label added to a list.
Good to know
Remove Prefix from Lines checks each line and, if it begins with the exact prefix you enter, removes that prefix. Lines that do not start with the prefix are left unchanged, and the comparison is exact including spaces.
Frequently asked questions
Is the prefix match exact?
Yes. A line must begin with the exact text you enter, spaces included, for the prefix to be removed.
What happens to lines without the prefix?
They are left exactly as they are, since only matching leading text is removed.
Can the prefix contain spaces?
Yes. The prefix is matched literally, so any spaces you include are part of what is removed.