Regular Expressions 101

Community Patterns

Secret HTML Comment

1

Regular Expression
PCRE (PHP <7.3)

/
<!--sec:\s*([\s\S]*?)\s*#-->
/
g

Description

This REGEX can be used for, e.g., PHP scripts to filter out comments that are only important for development.

Submitted by anonymous - a year ago