Community Patterns

Community Library Entry

-1

Regular Expression
Created·2022-06-10 19:58
Flavor·PCRE2 (PHP)

/
[b-df-hj-np-tv-z]
/
gm
Open regex in editor

Description

Use regex to test whether a letter is a consonant or not. Use /[B-DF-HJ-NP-TV-Z]/ for capitals.

Submitted by Matthew Hiebing