Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?<![\/a-zA-Z ])\n?(\/\/)?( *)?#(end)?region.*\n
/
g

Description

This regex matches properly spaced C# region statements, and can be used to remove them in an existing codebase.

Submitted by Jax - 7 years ago