Regex-based number-or-not classifier
The exact rule per line: `/^-?\d+(\.\d+)?$/` is tested against `line.trim()`. A line matches only if it is an optional leading `-`, one or more digits, and an optional decimal fraction. Matches count as numeric; non-matches count as text. Blank or whitespace-only lines are skipped before the test so they do not pad either bucket.
The regex is strict: no thousands separators, no scientific notation, no leading `+`, no hex or binary literals. `1,000` counts as text (comma is not a digit); `1e5` counts as text (no exponent support); `+5` counts as text (only `-` is allowed as a sign prefix).
Output is a three-line report: `Numeric: N`, `Text: M`, `Total: N+M`. The status bar shows the same counts in condensed form.
How to use detect numeric vs text items in a list
- 1Paste your list into the input panel
- 2Each trimmed non-blank line is tested against `/^-?\d+(\.\d+)?$/`
- 3Output shows `Numeric: N` / `Text: M` / `Total: N+M`
- 4No options - the regex is fixed
- 5For the values themselves (not the counts), use Filter numbers
Keyboard shortcuts
Drive ListShift without touching the mouse.
What this tool actually does
One regex, applied per line, counts matches vs non-matches.
Strict integer / decimal match
`/^-?\d+(\.\d+)?$/` - optional `-`, mandatory digits, optional `.digits`. Any deviation counts as text.
No thousands separators or scientific notation
`1,000`, `1_000`, `1e5`, `0x1A` all count as text. Pre-process with Replace if you need to normalise the numeric shape before detection.
Blank lines are skipped
Empty or whitespace-only lines are filtered before the regex runs. They do not add to Numeric, Text, or Total.
Whitespace tolerated at line edges
The line is trimmed before the regex test, so ` 123 ` matches as numeric. Internal whitespace in a "number" still fails (e.g. `1 000` is text).
For the items, not just the counts
Filter numbers applies the same shape test but returns the matching (or non-matching) lines instead of a count. Pick by whether you want the tally or the data.
Worked example
Three integer lines (`123`, `456`, `789`) and three non-numeric lines. Total = 6.
123 apple 456 banana 789 carrot
Numeric: 3 Text: 3 Total: 6
Behavior reference
No user options. These are the fixed rules.
| Rule | What it does | Example |
|---|---|---|
| Numeric pattern | `/^-?\d+(\.\d+)?$/` after trim | `123`, `-42`, `3.14` → numeric; `1,000`, `1e5`, `+5` → text |
| Blank lines skipped | Filtered before the regex test | Trailing blank does not add to Total |
| Edge whitespace tolerated | Trim runs before the regex test | ` 123 ` → numeric |
| Internal whitespace fails | Breaks the regex | `1 000` → text |