DEV Community

loading...

Discussion on: Daily Challenge #51 - Valid Curly Braces

Collapse
hanachin profile image
Seiei Miyagi • Edited

ruby <3

def areCurlyBracesMatched(s)
  s.match?(/\A(?<curly_brace>\{\g<curly_brace>*\})*\z/)
end