Regular Expression To Match Pipe-Delimited String

A regular expression that matches pipe(|) delimited strings.

/(\S*)+(\u007C)+(\S*)/

Matches:

  • regex|pattern|com
  • 123|456|789
  • ABC|DEF|GHI

Non-matches:

  • regex.pattern.com
  • 123,456,798
  • ABC DEF GHI

See Also: