Regex for pipe "|" character

I was trying to split a string using a regex today and i had this problem

my string of format

A | B | C

My intent was to split this string using the Regex match for “|”

The regex that worked for me was “\|” - escaping pipe and then escaping the slash the escapes the pipe

Tags:
You Might Also Like
Comments
comments powered by Disqus