Regular Expressions 101

Community Patterns

match a collection of usernames after tag 'users:' and between '[...]' and separated by commas

1

Regular Expression
ECMAScript (JavaScript)

/
(?<=(\s|\b)users:\[)([a-zA-Z0-9_, ]*)(?=\])
/
gm

Description

self explainatory title, usernames array must not contain any exotic character besides ,

Submitted by Lagoffre - a month ago