pythonbeginner
Regex Patterns
Advanced Python pattern: regex-patterns
pythonPress ⌘/Ctrl + Shift + C to copy
import re
text = 'Orders: #A-10, #B-22, #X-91'
ids = re.findall(r'#[A-Z]-\d+', text)
print(ids)Use Cases
- advanced programming
- patterns
Tags
Related Snippets
Similar patterns you can reuse in the same workflow.
pythonbeginner
Type Hints
Advanced Python pattern: type-hints
Best for: advanced programming
#python#advanced
pythonintermediate
Dataclass
Advanced Python pattern: dataclass
Best for: advanced programming
#python#advanced
pythonadvanced
Abc Abstract
Advanced Python pattern: abc-abstract
Best for: advanced programming
#python#advanced
pythonbeginner
Enum Types
Advanced Python pattern: enum-types
Best for: advanced programming
#python#advanced