Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(typedef\s+)?(?P<PACKED>\w+)?\s*(?P<TYPE>union|struct|enum)\s+(?P<NAME2>\w+)\s*\{(?P<FIELDS>.*?(?:\{.*?\}.*?)*?)\}(?P<NAME>[^;]*);
"
sg

Description

test struct c regex

Submitted by anonymous - 3 years ago