title: Regular expression: how to ignore block of text
body: <p>I use some macros in my HTML enclosed in {..}. I parse it before HTML output. Regex is looks like <code>/\{(.*?)\}/</code> (I simplified it for example). But later I found the problem. If HTML contains JavaScript then it is corrupted when it contains curly braces. 
  So I need to apply my regex to text that is not inside <code>&lt;script...&gt;&lt;/script&gt;</code> tags. How it can be done?</p>