Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2018-03-25 10:35
Flavor·PCRE (Legacy)

/
^#start of line (?![^\n!]*!{2,}) (?=[^_\n]*_[^_]*) #if _ exists, then: ([^_:]+) #mandatory group 1 ((?=:[^:\n]):[^:_(\n]+|) #optional group 2 (_(?!_)) #group 3 mandatory ([^_\-(\n]+) # group 4 mandatory \( #mandatory ( ([^()\n]+) # group 5 mandatory \) #mandatory ) ((?=!)!|) # group 6 optional ((?=:[^!:@\n]):[^!:@\n]+|) # group 7 optional ((?=::[^!:@\n])::[^!:@\n]+|) #group 8 optional ((?=@[^!:@\n])@[^!:@\n]+|) #group 9 optional $ #end of line
/
gmx
Open regex in editor

Description

Multiline regex for case when combinator is provided.

Submitted by anonymous