Regular Expressions 101

Community Patterns

Question Counter

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:\d+\.?|Q\d+|#\d+|-\s)[^\n]*\?$
/
mg

Description

Counts number of questions in either a Quiz style, test, etc. multiple options available.

Submitted by CodeByAidan - a month ago