Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2026-06-30 07:00
Flavor·PCRE2 (PHP)

/
(?:H[eogsf]?|L[iavru]|B[eahkri]?|C[arofmusenld]?|N[eiahopdb]?|O[sg]?|F[rle]?|M[godtcn]|A[lrsgutmc]|S[icerngmb]?|P[uabotmrd]?|Kr?|T[icebmsalh]|V|Z[nr]|G[ade]|R[buhenagf]|Yb?|I[nr]?|Xe|E[urs]|D[ysb]|W|U)
/
gm
Open regex in editor

Description

Matches for any element on the periodic table of elements

Submitted by Justin Hyland