Regular Expressions 101

Community Patterns

C# Add default xml comment to public class properties

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?'line'public (?'type'\w+\??) (?'property'[A-z]+).*)$
/
gm

Description

Converts this: public string? PropertyA { get; set; }

To this: /// <summary> /// PropertyA /// </summary> public string? PropertyA { get; set; }

Submitted by anonymous - 3 years ago