Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Developer Tools
#git
#branch
#vcs
#developer-tools

Git Branch Name

Validates standard Git branch names (e.g. feature/login, bugfix/issue-123, main, release/v1.0.4).

✓ Git hook validation✓ CI/CD branch rule check✓ Release automation
/
/
Safe
Test String
4 matches
(?:…)Non-capturing group— Non-capturing group — groups without capturing (no index assigned)
[…]+Character class […]— Matches any single character listed in this set — repeated one or more times (greedy) · + — one or more times (greedy)
(?:…)*Non-capturing group— Non-capturing group — groups without capturing (no index assigned) — repeated zero or more times (greedy) · * — zero or more times (greedy)
Pattern: 41 charsInput: 55 chars
100% client-side · private

✓ Valid Examples

  • main
  • feature/login-page
  • bugfix/issue-123
  • release/v1.0.4

✗ Invalid Examples

  • branch with spaces
  • branch@bad
  • feature/branch#tag

Usage & Integration

Validate Git Branch Name natively in your backend or frontend without copying regex strings.

Node / Edge

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

validate('git-branch', '...');

Python

from regexto_validators import validate

validate("git-branch", "...")

Go

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

valid, err := validators.Validate("git-branch", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('git-branch', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("git-branch", "...").unwrap();