title: Replace entire strings based on partial match
body: <p>New to R.  Looking to replace the entire string if there is a partial match. </p>
  
  <pre><code>d = c("SDS0G2 Blue", "Blue SSC2CWA3", "Blue SA2M1GC", "SA5 Blue CSQ5")
  
  gsub("Blue", "Red", d, ignore.case = FALSE, fixed = FALSE)
  </code></pre>
  
  <p><strong>Output:</strong> "SDS0G2 Red"   "Red SSC2CWA3" "Red SA2M1GC"  "SA5 Red CSQ5"</p>
  
  <p><strong>Desired Output:</strong> “Red”  “Red”   “Red”   “Red”</p>
  
  <p>Any help in solving this is truly appreciated.</p>