4 added 40 characters in body
source | link

CJam, 2219 2322 23 bytes

l0l{_91=\93=-}%{+_}*]%:e>

Translation ofSimilar idea to my MATL answer.

Try it hereThanks to Peter Taylor for removing 3 bytes

Try it here

l0                            read linepush asa string0
{l          }%                map this blockread online theas string
{  _91=\93=-          }%        1 if it's an opening bracket, -1map ifthis closing
block on the string
  _91=\93=-        {+_}*          1 cumulativeif sum.it's Givesan individualopening numbersbracket, (not-1 anif array)closing
              +_    ]          pack into ancumulative arraysum
               :e>    :e>       fold maximum function on that array

CJam, 22 23 bytes

l{_91=\93=-}%{+_}*]:e>

Translation of my MATL answer.

Try it here

l                            read line as string
{          }%                map this block on the string
  _91=\93=-                  1 if it's an opening bracket, -1 if closing
             {+_}*           cumulative sum. Gives individual numbers (not an array)
                  ]          pack into an array
                   :e>       fold maximum function on that array

CJam, 19 22 23 bytes

0l{_91=\93=-+_}%:e>

Similar idea to my MATL answer.

Thanks to Peter Taylor for removing 3 bytes

Try it here

0                            push a 0
l                            read line as string
{            }%              map this block on the string
  _91=\93=-                  1 if it's an opening bracket, -1 if closing
           +_                cumulative sum
               :e>           fold maximum function
3 added 10 characters in body
source | link

CJam, 2322 23 bytes

l{_91=\93=-}%{+_}*]:e>

Translation of my MATL answer.

Try it here

l                            read line as string
{          }%                map this block on the string
  _91=\93=-                  1 if it's an opening bracket, -1 if closing
             {+_}*           cumulative sum. Gives individual numbers (not an array)
                  ]          pack into an array
                   :e>       fold maximum function on that array

CJam, 23 bytes

l{_91=\93=-}%{+_}*]:e>

Translation of my MATL answer.

Try it here

l                            read line as string
{          }%                map this block on the string
  _91=\93=-                  1 if it's an opening bracket, -1 if closing
             {+_}*           cumulative sum. Gives individual numbers (not an array)
                  ]          pack into an array
                   :e>       fold maximum function on that array

CJam, 22 23 bytes

l{_91=\93=-}%{+_}*]:e>

Translation of my MATL answer.

Try it here

l                            read line as string
{          }%                map this block on the string
  _91=\93=-                  1 if it's an opening bracket, -1 if closing
             {+_}*           cumulative sum. Gives individual numbers (not an array)
                  ]          pack into an array
                   :e>       fold maximum function on that array
2 added 83 characters in body
source | link

CJam, 23 bytes

l{_91=\93=-}%{+_}*]:e>

Translation of my MATL answer.

Try it here

l                            read line as string
{
  _91=\93=-     1 if it's a [, -1 if ]
}%                map this block on the string
  _91=\93=-                  1 if it's an opening bracket, -1 if closing
             {+_}*           cumulative sum. Gives individual resultsnumbers (not an array)
]                  ]          pack into an array
:e>                   :e>       fold maximum function on that array

CJam, 23 bytes

l{_91=\93=-}%{+_}*]:e>

Translation of my MATL answer.

Try it here

l               read line as string
{
  _91=\93=-     1 if it's a [, -1 if ]
}%              map this block on the string
{+_}*           cumulative sum. Gives individual results (not array)
]               pack into an array
:e>             fold maximum on that array

CJam, 23 bytes

l{_91=\93=-}%{+_}*]:e>

Translation of my MATL answer.

Try it here

l                            read line as string
{          }%                map this block on the string
  _91=\93=-                  1 if it's an opening bracket, -1 if closing
             {+_}*           cumulative sum. Gives individual numbers (not an array)
                  ]          pack into an array
                   :e>       fold maximum function on that array
1
source | link