Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

Description

We have a pipe delimited text file and each new record is separated by a CRLF. Each record has a fixed number of pipes, but not every column or field is valued, so there may be 2 or more pipes together. Is there a way to write a regex to parse out the third or fifth value? Many thanks in advance.

Submitted by Jon - 9 years ago