Notepad ++ regex replace css @media

I want to clear everything between @mediaand }. Only after research I still can not find. I want to replace everything between the BOLD text below, including the BOLD text :

@media all and (max-width: 240px)

{
  # toast-container> div
  {
    padding: 8px 8px 8px 50px;
    width: 11em;
  }

  # toast-container .toast-close-button
  {
    right: -.2em;
    top: -.2em;
  };
}

@media (min-width: 768px)
{
  .lead
  {
    font-size: 19.5px;
  };
}

RESULT 1: @media }

RESULT 2: Nothing

+4
source share
1 answer

Replace Dialog (Ctrl + H) Regular Expression . matches newline

:

@media.*?\};.*?\}

@media.*?(\};)\s*?\}

... ( - )

, .

+2

All Articles