Identifier validation
Anchors and a bounded repeated character class.
Scope: Regex syntax and structural exploration only. Match evidence requires an external engine.
Preview
Source
regex-identifier.puml
text/plain
@startregex
title Identifier
^[A-Za-z_][A-Za-z0-9_]{0,31}$
@endregex