title: R 3.4.1 gsub on Windows 10 - find and replace all strings except for
body: <p>I am trying to clean up data for a class project. The data deals with NOAA Storm data from 1950 to 2011. The storm types (EVTYPE) are only supposed to be 48 different levels, but there are over 1000 unique entries. I am trying to find all the snow related entries, which gives me:</p>
  
  <pre><code> table(grep("snow", temp$EVTYPE, ignore.case = TRUE, value = TRUE))
  
    ACCUMULATED.SNOWFALL               BLOWING.SNOW              COLD.AND.SNOW              DRIFTING.SNOW 
                       4                          5                          1                          1 
          EARLY.SNOWFALL             EXCESSIVE.SNOW           FALLING.SNOW.ICE                 FIRST.SNOW 
                       7                         25                          2                          2 
              HEAVY.SNOW          HEAVY.SNOW.SHOWER         HEAVY.SNOW.SQUALLS                   ICE.SNOW 
                   13988                          1                          1                          4 
        LAKE.EFFECT.SNOW           LATE.SEASON.SNOW       LATE.SEASON.SNOWFALL                  LATE.SNOW 
                     656                          1                          3                          2 
              LIGHT.SNOW        LIGHT.SNOW.FLURRIES LIGHT.SNOW.FREEZING.PRECIP             LIGHT.SNOWFALL 
                     174                          3                          1                          1 
           MODERATE.SNOW          MODERATE.SNOWFALL           MONTHLY.SNOWFALL             MOUNTAIN.SNOWS 
                       1                        101                          1                          1 
         RECORD.MAY.SNOW                RECORD.SNOW            RECORD.SNOWFALL         RECORD.WINTER.SNOW 
                       1                          2                          2                          3 
       SEASONAL.SNOWFALL                       SNOW          SNOW.ACCUMULATION              SNOW.ADVISORY 
                       1                        425                          1                          1 
            SNOW.AND.ICE             SNOW.AND.SLEET          SNOW.BLOWING.SNOW               SNOW.DROUGHT 
                       4                          5                          6                          4 
                SNOW.ICE               SNOW.SHOWERS                 SNOW.SLEET                SNOW.SQUALL 
                       1                          5                          5                          5 
            SNOW.SQUALLS         THUNDERSNOW.SHOWER        UNUSUALLY.LATE.SNOW 
                      14                          1                          1 
  </code></pre>
  
  <p>There is a storm type called "Lake.Effect.Snow", which is one of the 48 storm types. How can I replace all of the other entries while excluding that particular storm type? I've tried:</p>
  
  <pre><code>table(grep("([^lake]?)snow", temp$EVTYPE, ignore.case = TRUE, value = TRUE))
  </code></pre>
  
  <p>to try and ignore the Lake.Effect.Snow entries, but no good.</p>