How does it work?
This tool duplicates lines in your text and decrements any numbers found in each duplicate. It's useful for creating sequences with decreasing numeric values.
The process follows these steps:
- The tool identifies the lines you want to duplicate (all lines by default)
- It creates the specified number of duplicates for each selected line
- For each duplicate, it finds all numbers in the original line and decrements them by the duplicate's position
- The original lines remain unchanged, and the duplicates are inserted after each original line
Example
Consider this input text:
Item 10: First item
Item 20: Second item
Item 30: Third item
Item 40: Fourth itemAfter duplicating each line twice with decremented numbers:
Item 10: First item
Item 9: First item
Item 8: First item
Item 20: Second item
Item 19: Second item
Item 18: Second item
Item 30: Third item
Item 29: Third item
Item 28: Third item
Item 40: Fourth item
Item 39: Fourth item
Item 38: Fourth itemParameters
- Input text: The text containing lines and numbers you want to duplicate and decrement
- Number of duplicates: How many duplicates to create for each selected line
- Start line: The first line to process (1-based index)
- End line: The last line to process (0 means process all lines to the end)
This tool is useful for:
- Creating test data with sequential decreasing values
- Generating numbered lists with decreasing values
- Preparing data for batch processing with decreasing indices
- Creating countdown sequences
- Generating code templates with decreasing numeric identifiers
Tip:
You can use the start and end line parameters to duplicate only specific sections of your text. This is useful when working with large documents where you only need to process certain parts.
Related Tools
- Duplicate and Increment - Duplicate lines and increment numbers
- Duplicate with Multiple Replacements - Duplicate lines with multiple text replacements
- Increment Numbers - Increment all numbers in text
- Decrement Numbers - Decrement all numbers in text
- Create Sequence - Generate numeric sequences
All Tools
See all available tools