Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
^(?'prefix'(?:[<>]=?|=)|~|!!?|\+)?(?'base'(?'category'[A-Za-z\d\-]+)\/(?'packagename'[A-Za-z][\w\-\+]*?))(?:-(?'version'\d[\w\.]*\*?)(?:-r(?'revision'[\d\.]+))?)?(?:\:(?'slot'[\d\.]*\=?|\*)(?:\/(?'subslot'[\d\.]+\=?))?)?(?: +(?'useflags'[\w\s\-]+))? *$
/
gm

Description

no description available

Submitted by selurvedu - 10 years ago