Regular Expressions 101

Community Patterns

match a username after 'user:'

1

Regular Expression
ECMAScript (JavaScript)

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

Description

self explainatory title, username must not contain any exotic character.

Submitted by Lagoffre - a month ago