Regular Expressions 101

Community Patterns

Your search did not match anything

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?(DEFINE) (?<program> ^ (?&rule)* (?&ws) $ ) (?<rule> (?&ws) (?&term) (?&ws) ( :\- (?&ws) (?&conj) )? \. \n* ) (?<conj> (?&term) (?&ws) ( , (?&ws) (?&term) (?&ws) )* ) (?<value> (?&atom) | (?&variable) ) (?<term> (?&atom) ( \( (?&ws) (?&value) (?&ws) ( , (?&ws) (?&value) (?&ws) )* \) )? ) (?<atom> \p{Ll} [\p{L}\d_]* ) (?<variable> [_\p{Lu}] [\p{L}\d_]* ) (?<ws> \s* ( %.* \s* )* ) ) (?&rule)
/
xg

Description

A Unicode friendly parser for Datalog, the functor-free subset of pure Prolog.

Submitted by stellartux - 3 months ago (Last modified 3 months ago)