Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
\$*([^$]+)\$*
/
gim

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 - 10 years ago