title: finding text in a string and replacing whole string with another string + R
body: <p>I have this vector/array in R programming that I would like to find "WIND" (upercase or lower case) and replace the whole text with "WIND" </p>
  
  <pre><code>&gt; b
   [1] "TORNADO"                   "TSTM WIND"                 "HAIL"                     
   [4] "FREEZING RAIN"             "SNOW"                      "ICE STORM/FLASH FLOOD"    
   [7] "SNOW/ICE"                  "WINDTER STORM"             "HURRICANE OPAL/HIGH WINDS"
  [10] "THUNDERSTORM WINDS"  
  </code></pre>
  
  <p>Fo r  example "TSTM WIND"  would be come "WIND". So would "WINDTER STORM" and "HURRICANE OPAL/HIGH WINDS"...etc</p>
  
  <p>I have tried this but no joy</p>
  
  <pre><code>&gt; gsub("*WIND*","WIND",b,ignore.case=T)
   [1] "TORNADO"                   "TSTM WIND"                 "HAIL"                     
   [4] "FREEZING RAIN"             "SNOW"                      "ICE STORM/FLASH FLOOD"    
   [7] "SNOW/ICE"                  "WINDTER STORM"             "HURRICANE OPAL/HIGH WINDS"
  [10] "THUNDERSTORM WINDS"       
  &gt;
  </code></pre>
  
  <p>this show the ones that meet my criteria</p>
  
  <pre><code>&gt; grepl("*WIND*",b,ignore.case=T)
   [1] FALSE  TRUE FALSE FALSE FALSE FALSE FALSE  TRUE  TRUE  TRUE
  </code></pre>