Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?!^\*)+?(?:^\W*\r*)(?<country>[\w]{0,1}[^\r\n])(?:[^\w*]+)(?<channel>[\w?,'\"\-_ ]*(?<![^\w?!])).*?(?<tag>\w*$)|(?<channel2>^[\w?,'\"\-_]+(?<![^\w?!]))[^\w\r\n\*\t\f\v]*(?<tag2>\w+$)?
/
mg

Description

Get parts of an IPTV playlist

Submitted by anonymous - 5 years ago