Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-09-23 20:27
Updated·2022-09-23 21:29
Flavor·PCRE2 (PHP)

#
</?[^\0- !-@[-`{-\x7f][^\0- !-,:-@[-`{-\x7f]*+(?!>)
#
gm
Open regex in editor

Description

A bare demo of detecting syntactically invalid HTML, created for jridgewell/proposal-regexp-atomic-and-possessive#1.

It's a proposal for the + quantifier modifier for ECMAScript regular expressions.

Currently only properly detects invalid ending tags, and is only about having the correct syntax.

Submitted by Keyacom