Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Markdown
#markdown
#horizontal-rule
#hr
#divider

Markdown Horizontal Rule

Matches a Markdown horizontal rule — three or more dashes, asterisks, or underscores on a line.

Markdown parsersSection detectionDocument structure analysis
/
/
Risk
Test String
5 matches
^^^ — start of string (or line in multiline mode)
(…)Group #1Capturing group — captures matched text for reuse or extraction
[…]Character class […]Matches any single character listed in this set
\s*space\s — whitespace (space, tab, newline…) — repeated zero or more times (greedy) · * — zero or more times (greedy)
\1\1\1 — escaped character '1'
\s*space\s — whitespace (space, tab, newline…) — repeated zero or more times (greedy) · * — zero or more times (greedy)
\1\1\1 — escaped character '1'
(?:…)*Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated zero or more times (greedy) · * — zero or more times (greedy)
\sspace\s — whitespace (space, tab, newline…)
||| — alternation: matches expression on left OR right
\1\1\1 — escaped character '1'
$$$ — end of string (or line in multiline mode)
Pattern: 29 charsInput: 23 chars
100% client-side · private

Valid Examples

  • ---
  • ***
  • ___
  • - - -
  • * * *

Invalid Examples

  • --
  • **
  • not a rule
  • --- text

Usage & Integration

Validate Markdown Horizontal Rule natively in your backend or frontend without copying regex strings.

Node / Edge

import { validate } from '@regexto/validators';

validate('markdown-hr', '...');

Python

from regexto_validators import validate

validate("markdown-hr", "...")

Go

import "github.com/regex-to/validators-go"

valid, err := validators.Validate("markdown-hr", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('markdown-hr', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("markdown-hr", "...").unwrap();