Regular Expressions 101

Sponsors

Library entries

0
pcre2

First_Tests

first tests
Submitted by anonymous - a year ago
0
pcre2

Validate UUID

Use this regex to validate a UUID
Submitted by @eltonplima - a year ago
0
pcre2

Extract noun chunks

Extract noun chunks in a sentence.
Submitted by anonymous - a year ago
0
pcre2

array() to shorthand []

PHP array() syntax to shorthand
Submitted by anonymous - a year ago
0
pcre2

isNumber

Find that given string is number or not.
Submitted by anonymous - a year ago
0
pcre2

[promtail] pod-controller

matching pod-controller
Submitted by anonymous - a year ago
0
pcre2

Find PHP short open tags

Find PHP short open tags
Submitted by anonymous - 10 months ago

Add missing ClassVar type annotations to arbitrarily nested Python class attributes with existing annotations.

Vote

0

Regular Expression
python

"
(?P<preceeding>^(?P<whitespace>(?:[ ]{4}|\t)+)(?!self\.)(?P<attrprefix>[a-z0-9_\.]{1,})?(?P<clsattrname>[A-Z_]{1,}): )(?P<annotation>(?!ClassVar)(?:[A-Za-z0-9_]+\.*)+(?:(?:(?:\[?[A-Za-z0-9_]+(?:, | \| )?)+(?:\.{3})?)*(?:\]*))*)+(?P<remainder>.*?$[\r\n])
"
gm

Description

Loading markdown...
Submitted by jrbergen - 10 months ago