Sponsors

There are currently no sponsors. Become a sponsor today!

1

PCRE2 (PHP >=7.3)

/

^(?P<WFF>(?P<L>~*(?>[A-Z\^!]|\(\g<WFF>\)))(?(?=\$)\$\g<L>|(?:(?P<O>[\%&|])(?:\g<L>\k<O>)*\g<L>)?))$

/

gx

Matches strings that are Well-formed-formulas in Propositional with the following symbols {⊤,⊥,∧,∨,¬,→,↔} This matches with formulas that are looser then defined by formal syntax (See https://en.wikipedia.org/wiki/Well-formed_formula#Propositional_calculus). Namely, it's able to match with > No External Parenthesis > Generalized Conjunction, Disjunction, & Biconditional

Submitted by Gabriel Weredyk - 21 days ago (Last modified 7 days ago)