Community Patterns

Community Library Entry

0

Regular Expression
Created·2015-01-12 04:28
Flavor·ECMAScript (JavaScript)

/
\$*([^$]+)\$*
/
gim
Open regex in editor

Description

Please help! This is probably a very simple task for regex experts. I want to extract and group the fields before or after each pipe character |.

1234|text1|text2|text3|text4|text5

Expected result would be separate groups e.g.: 1234 text1 text2 text3 text4 text5

Submitted by Grateful or dead