Dev
#git
#sha
#commit
#version-control
Git Commit SHA
Matches a Git commit SHA — either short form (7+ chars) or full 40-character SHA-1 hash.
✓ CI/CD pipelines✓ Deployment tracking✓ Code review tools
✓ Valid Examples
- a1b2c3d
- a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
✗ Invalid Examples
- xyz
- ZZZZZZ
- 123456
Usage & Integration
Validate Git Commit SHA natively in your backend or frontend without copying regex strings.
Node / Edge
import { validate } from '@regexto/validators';
validate('git-sha', '...');Python
from regexto_validators import validate
validate("git-sha", "...")Go
import "github.com/regex-to/validators-go"
valid, err := validators.Validate("git-sha", "...")PHP
use RegexTo\Validators\Validator;
Validator::validate('git-sha', '...');Rust
use regexto_validators::validate;
let is_valid = validate("git-sha", "...").unwrap();