How can I extract text from between two delimiters on a line in bash?

Posted by syker on Stack Overflow See other posts from Stack Overflow or by syker
Published on 2010-04-08T21:42:23Z Indexed on 2010/04/08 23:03 UTC
Read the original article Hit count: 390

Filed under:
|

What is a regex I can write in bash for parsing a line and extracting text that can be found between two | (so that would be ex: 1: |hey| 2: |boy|) and keeping those words in some sort of array?

© Stack Overflow or respective owner

Related posts about regex

Related posts about bash