text_remove_line_numbers
Strip leading line numbers from text using auto detection, custom regex, or manual mode. Returns cleaned text with statistics.
Instructions
Remove Line Numbers. Strip leading line numbers and numbered prefixes from each line of the supplied text, returning the cleaned text plus before/after statistics. In auto mode it samples the first lines to detect the numbering style (colon, dot, parenthesis, bracketed, space-separated, or zero-padded) and removes the best match; pattern mode applies your own regex; manual mode strips any leading digits with common separators. This is the inverse of text_add_line_numbers; use this to clean pasted code listings, logs, or numbered output. Pure local compute: read-only, non-destructive, offline, and rate-limited (60 requests/min for anonymous callers). Returns the cleaned result, counts of processed and unchanged lines, and the detected pattern with a confidence percentage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Multi-line text to clean; split on newline (\n). Empty input is rejected with HTTP 400. | |
| detectionMode | No | How numbers are found. auto detects the dominant style from a 10-line sample; pattern uses customPattern; manual strips leading digits followed by a separator. | auto |
| customPattern | No | Regex used only when detectionMode is pattern; accepts a bare body or /body/flags form. Capture group 1 or 2 is kept as the cleaned line. Invalid regex returns HTTP 400. | |
| removeAll | No | Reserved flag accepted for forward compatibility; does not change current output. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Always true on success. | |
| result | No | The text with line numbers removed. | |
| stats | No | Counts for the input and output plus detection summary. | |
| options | No | The effective settings applied. |