Certainly not pretty with that funky regex, but it works:

msg = "THIS is a Text and (NO Change HERE) HELP (Not here Either)"

msg.gsub!(/([^\(]*(?!\())|(\(.*?\))|(\)[^\)]*\))/) do |m|
	m[0] == 40 ? m : m.downcase
end

- Scott

ilhamik wrote:
> hi,
> I want to downcase a string but without specific parts.
> for example:
> msg = "THIS is a Text and (NO Change HERE) HELP"
>
> after downcase it should look like "this is a text and (NO Change HERE)
> help"
>
> I don't want to downcase the letters in parentheses.
> How can i do that, i  tried it with regular expressions but can't do
> it. 
> 
> Thanks for any help