Regular Expressions 101

Rust type-like ident casing

Open Workspace
  • Rust
  • Match
1

Regular Expression

r"
^(?: ( (?:bool|char|str) |(?:[fiu](?:32|64)) |(?:[iu](?:8|16|128|size)) )|( _*[A-Z][a-zA-Z0-9_]* ) )$
"
xgm

Description

Matches built-in primitives and identifiers with casing conventionally used for type/constant names.

Submitted by Neel Yadav