Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Social
#hashtag
#social
#twitter
#instagram

Hashtag

Matches a social media hashtag — # followed by one or more word characters (letters, digits, underscores), starting with a letter.

Social media parsingContent taggingTrending topics
/
/
Safe
Test String
4 matches
##'#' — literal character
[…]Character class […]Matches any single character listed in this set
A-ZA-ZA-Z — range from 'A' to 'Z'
a-za-za-z — range from 'a' to 'z'
[…]*Character class […]Matches any single character listed in this set — repeated zero or more times (greedy) · * — zero or more times (greedy)
A-ZA-ZA-Z — range from 'A' to 'Z'
a-za-za-z — range from 'a' to 'z'
0-90-90-9 — range from '0' to '9'
__'_' — literal character
Pattern: 22 charsInput: 43 chars
100% client-side · private

Valid Examples

  • #regex
  • #WebDev2024
  • #hello_world
  • #TypeScript

Invalid Examples

  • #123abc
  • # space
  • #
  • notahashtag

Usage & Integration

Validate Hashtag natively in your backend or frontend without copying regex strings.

Node / Edge

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

validate('hashtag', '...');

Python

from regexto_validators import validate

validate("hashtag", "...")

Go

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

valid, err := validators.Validate("hashtag", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('hashtag', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("hashtag", "...").unwrap();