Sort list sentences

Sort list sentences by splitting input on sentence-ending punctuation followed by whitespace (regex `/(?<=[.!?])\s+/`), sorting the resulting sentences alphabetically, then rejoining with a single space. Output is one continuous paragraph, not one sentence per line.

Input
Ready
Output
Live

Sentence-aware sort via punctuation split

The splitter uses a lookbehind regex: wherever one of `.`, `!`, or `?` is immediately followed by whitespace (space, tab, or newline), that is a sentence boundary. The punctuation stays attached to the preceding sentence; the whitespace is discarded.

Output is joined with a single space. If your input was multiple lines and each line ended with a period, the output collapses those lines into one space-separated paragraph. To get one-sentence-per-line output, run Add line breaks after.

`localeCompare(numeric: true)` handles natural number ordering. `Option 2` sorts before `Option 10`.

How to use sort list sentences

  1. 1Paste prose containing multiple sentences into the input panel
  2. 2Sentences are split on `.`, `!`, `?` followed by whitespace
  3. 3Pick Order: A→Z (default) or Z→A
  4. 4Output is a single line with sentences space-joined
  5. 5For one-sentence-per-line output, chain Add line breaks after

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

What this tool actually does

Regex-based sentence split + alphabetical sort + space-join.

Splits on `.!?` + whitespace

Lookbehind regex `/(?<=[.!?])\s+/`. Punctuation stays with the preceding sentence. Missing punctuation? The whole input is treated as one sentence.

Space-joined output

Sorted sentences are joined with a single space, producing flowing prose. This is different from line-based sort tools which preserve newlines.

Natural-number sort

`localeCompare` with `numeric: true` treats embedded numbers naturally. `Chapter 2` precedes `Chapter 10`.

Abbreviation handling

No special handling. A sentence containing `Mr.` followed by a space will be split at `Mr. `. If your prose uses abbreviations, expect spurious splits. Pre-process with Replace if precision matters.

Two options only

Order (asc/desc) and Case sensitive. No length sort, no numeric-only sort, no shuffle. Use Sort by length or Shuffle for those.

Worked example

Three sentences separated by `.` + space. Output is one space-joined line, sorted A→Z.

Input
Zebra crossing. Apple pie recipe. Banana smoothie tips.
Output
Apple pie recipe. Banana smoothie tips. Zebra crossing.

Settings reference

How each option shapes the output using the sample above.

Setting What it does Effect on the sample
Order: A→Z (default) Ascending sort `Apple pie recipe. Banana smoothie tips. Zebra crossing.`
Order: Z→A Descending sort `Zebra crossing. Banana smoothie tips. Apple pie recipe.`
Case sensitive: on Separates cased variants Uppercase-starting sentences group first under default locale rules
Case sensitive: off (default) `apple` and `Apple` sort as equal Stable sort preserves original relative order for equal keys
No punctuation in input (automatic) Treated as one sentence Output identical to input

FAQ

Why is the output one line and not one sentence per line?
The op joins sentences with a single space - producing flowing prose. For line-separated output, chain Add line breaks after, or use Sort lines on pre-split input.
Does it handle abbreviations like `Mr.` or `e.g.`?
No. Any `.` followed by whitespace is a sentence boundary. `Mr. Smith saw Mrs. Jones.` would split into three segments. Pre-process with Replace to temporarily mask abbreviations.
What if my input has no sentence-ending punctuation?
The whole input is treated as one sentence - output equals input. Add periods first or use Sort lines instead.
Can I sort by sentence length?
Not with this tool. Use Sort by length on line-separated input.
Is the sort stable?
Yes - stable sort since ES2019. Sentences with the same sort key keep original relative order.