Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
^\s*(?P<modifiers>(?:\s*(?:private|const|static))*)\s*(?P<fulltype>(?P<type>[^\s<\[{]+)\s*(?P<generics><\s*.+\s*>)?)\s+(?P<name>[^\s<{]+)\s*(?:=\s*(?P<value>.+))?$
"
gm

Description

Used for extracting information from doxygen.

Handles:

  1. modifiers
  2. type, with generics
  3. name
  4. default value

Support for generics is limited

Submitted by anonymous - 4 years ago