Regular Expressions 101

Library entries

Gentoo atom parsing

Vote

2

Regular Expression
pcre

/
^(?'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

Loading markdown...
Submitted by selurvedu - 7 years ago