title: Replacing multiple patterns in a block of data
body: <p>I need to find the most efficient way of matching multiple regular expressions on a single block of text. To give an example of what I need, consider a block of text:</p>
  
  <p>"Hello World what a beautiful day"</p>
  
  <p>I want to replace Hello with "Bye" and "World" with Universe. I can always do this in a loop ofcourse, using something like String.replace functions availiable in various languages.</p>
  
  <p>However, I could have a huge block of text with multiple string patterns, that I need to match and replace. </p>
  
  <p>I was wondering if I can use Regular Expressions to do this efficiently or do I have to use a Parser like LALR.</p>
  
  <p>I need to do this in JavaScript, so if anyone knows tools that can get it done, it would be appreciated. </p>