Regular Expressions 101

Community Patterns

There does not seem to be anything here

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 - a month ago (Last modified a month ago)