Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?#leftside)[a-zA-Z][a-zA-Z0-9]*((\s)*\[(\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*)((\s)*[+*\/-](\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*))*(\s)*\])?(?#rightside)(\s)*=(\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*((\s)*\[(\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*)((\s)*[+*\/-](\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*))*(\s)*\]|(?#idk)(\s)*\((\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*)((\s)*[,+*\/-](\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*))*(\s)*\))?)((\s)*[+*\/-](\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*((\s)*\[(\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*)((\s)*[+*\/-](\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*))*(\s)*\]|(\s)*\((\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*)((\s)*[,+*\/-](\s)*([0-9]+|[a-zA-Z][a-zA-Z0-9]*))*(\s)*\))?))*(\s)*;
/
gm

Description

no description available

Submitted by anonymous - 4 years ago