Balanced triplet brackets A "triplet bracket" (that I made up for this challenge) is one of the following:

(...+...)
[...:...]
{...|...}
&lt;...-...&gt;


A balanced triplet bracket string (BTBS for short) is either an empty string, two BTBSes concatenated, or one of the above triplet brackets with each ... replaced with a BTBS.

Your task is to write a program or function that checks whether a string that consists of only (+)[:]{|}&lt;-&gt; is balanced. Shortest code wins.

Examples

Your program should return truthy for the following strings:

(+)(+)(+)
[[[:]:]:(+(+))]{&lt;-&gt;|&lt;(+)-&gt;[:]}(+)
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;
{|(+[:&lt;-{|(+[:&lt;-&gt;])}&gt;])}
[[[:]:[:]]:[[:]:[:]]]
{[:](+)|&lt;-&gt;{|}}[(+)&lt;-&gt;:{|}(+)]


Your program should return falsy for the following strings:

:[
&lt;|&gt;
(+(+)
[:][:](+[[:]):]
{|{|{|(+{|{|{|}}}}}+)}[:]{|}
{{||}}
&lt;&lt;-&gt;-&lt;-&gt;-&lt;-&gt;&gt;
[(+):((+)+)+(+(+))]
&lt;&lt;&lt;&lt;&lt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;
JavaScript (ES6), 77 58 57 56 bytes

f=s=&gt;s==(s=s.replace(/\(\+\)|\[:]|{\|}|&lt;-&gt;/,''))?!s:f(s)


Test cases



f=s=&gt;s==(s=s.replace(/\(\+\)|\[:]|{\|}|&lt;-&gt;/,''))?!s:f(s)

console.log("Testing truthy values");
console.log(f("(+)(+)(+)"));
console.log(f("[[[:]:]:(+(+))]{&lt;-&gt;|&lt;(+)-&gt;[:]}(+)"));
console.log(f("&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;"));
console.log(f("{|(+[:&lt;-{|(+[:&lt;-&gt;])}&gt;])}"));
console.log(f("[[[:]:[:]]:[[:]:[:]]]"));
console.log(f("{[:](+)|&lt;-&gt;{|}}[(+)&lt;-&gt;:{|}(+)]"));

console.log("Testing falsy values");
console.log(f(":["));
console.log(f("&lt;|&gt;"));
console.log(f("(+(+)"));
console.log(f("[:][:](+[[:]):]"));
console.log(f("{|{|{|(+{|{|{|}}}}}+)}[:]{|}"));
console.log(f("{{||}}"));
console.log(f("&lt;&lt;-&gt;-&lt;-&gt;-&lt;-&gt;&gt;"));
console.log(f("[(+):((+)+)+(+(+))]"));
console.log(f("&lt;&lt;&lt;&lt;&lt;-&gt;-&gt;-&gt;-&gt;-&gt;-&gt;"));