I can match the first line and open div#someId input { in the text:
div#someId input
{
padding-left: 2px;
border: 0;
background-color: white;
}
using: (^div#.*input$\n)\{
However, I want to match only the {, since I want to insert some CSS rules below by replacing { with e.g. {\nheight: 100%;
I using the Visual Studio Find and Replace dialog so I’m not able to create any variables or execute anything other than regex (that I’m aware of), so I assume the answer will be regex only.
You can use a group reference.
\0stores the entire match, and you can use it in your replacementment.Edit escaping the
#based on Alan Moore’s comment