Avoid words like "from" or "between" in number ranges (EK00027)
A clean dash range like 1-10 reads clearer than "from 1 - 10" in documentation. Learn why to drop "from" or "between" before a dash, with fixes.
A dash already expresses a numeric range, so drop a leading word like “from” or “between” and write a clean range such as 1-10. EkLine flags a range that pairs “from” or “between” with a dash and suggests removing the word (rule EK00027).
Why avoid “from” or “between” in a number range?
Section titled “Why avoid “from” or “between” in a number range?”Mixing “from” or “between” with a dash creates a redundant, grammatically incomplete range that reads awkwardly to your audience. A clean dash range is shorter and unambiguous, which matters when readers scan specifications and limits. Consistent range formatting also keeps reference tables and API docs uniform.
What EkLine flags
Section titled “What EkLine flags”EK00027 matches phrases such as “from 1 - 10” or “between 1 - 10” that describe a numeric range with a dash.
- ❌ Incorrect: Choose a value from 1 - 10.
- ✅ Correct: Choose a value in the range 1-10.
- ❌ Incorrect: Send between 5 - 8 requests per second.
- ✅ Correct: Send 5-8 requests per second.
How to fix
Section titled “How to fix”Remove “from” or “between” and write the range with a dash, or complete the phrase with “from X to Y”.
How do you write a number range correctly?
Section titled “How do you write a number range correctly?”Use a dash between the two values, such as “1-10”, or spell the range out in full with “from X to Y”. Don’t combine a leading “from” or “between” with a dash.
Is “from 5 - 8” wrong?
Section titled “Is “from 5 - 8” wrong?”Yes. It mixes two ways of showing a range and leaves the phrase grammatically incomplete. Write “5-8” or “from 5 to 8” instead.
Rule details
Section titled “Rule details”| Property | Value |
|---|---|
| Rule ID | EK00027 |
| Category | Spelling and grammar |
| Default severity | Warning |
| Enabled by default | Yes |
Ignore this rule
Section titled “Ignore this rule”To keep a flagged range on one line, add an inline comment:
<!-- ekline-ignore-next-line EK00027 -- quoted specification text -->The spec reads "between 5 - 8 requests".To disable the rule across your project, add it to the ignore list in your configuration file.