Test, validate and match regular expressions
This regex matches the keywords 'public', 'private', or 'enum' when followed by a space (and an identifier for 'enum'). It captures the matched keyword into separate groups, making it useful for identifying access modifiers and enum declarations during source code parsing or text analysis.