Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Golang

`
^(\[\w+\]){1,2}\s(.*?)\s-\s(\d+)?(v\d+)?(\s(\(\w+p\)|(\[\w+p\]))?){1,2}.*$
`
gm

Description

Parse XDCC filename strings for a name and episode. Appears to work for most major bots but unreliable for any data other than name and episode number/version

Submitted by anonymous - 2 years ago