Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2018-02-18 08:50
Flavor·PCRE (Legacy)

/
(([\w\s\d]+\s)(is the|is a|are the|are a|was)\s([\w\d\s\[\]\)\(,']+))
/
g
Open regex in editor

Description

Match patterns of form "{% sentence_prefix %} (is|are) (a|the) {% description_of_prefix %}". Should almost always match part of the first sentence of a Wikipedia article.

Submitted by anonymous