/( #A nice simple capture, for [^|\{]+ #a block of nonsignificant chars | \{ [^}]+ \} #or a bracketed block ) \| #followed by a pipe. /x #### $VAR1 = [ '', 'foo', '', '{baz|qux}', 'fax' ]; #### If the PATTERN contains parentheses, additional list elements are created from each matching substring in the delimiter.