How to remove text that is between two brackets using regular expressions?

Страниц: 320 (Офсет) 

And I need to write the word Offset in the string

    1 answer 1

    Changed!

    Try this:

     .*?\(([^)]*).* - неправильный пример, сорри, не учитывается закрывающая скобка! 

    You need this:

     .*?\(([^)]*)\).* 

    Test for Ruby:

     mystring = 'Страниц: 320 (Офсет)'.match('.*?\(([^)]*)\).*')[1] puts mystring 

    Write the 'Offset' value to the mystring variable

    http://ideone.com/54Rrsz