.NET Tips and Tricks

Blog archive

How to Use Regular Expressions in Visual Studio Find

I have to admit that I've never really understood regular expressions. But if there was any reason that I was going to learn to use them, it would be when doing searches in Visual Studio.

For one thing, regular expressions are easy to invoke when doing a search: When you press Ctrl_F to get the Find dialog box, all you have to do is click the asterisk (*) to the left of the of scope dropdown list to start using regular expressions in your search.

I think, for example, I'm ready to start using the period (which matches a single character) in my searches. That would let me (for example) search for any string that begins with a and ends with p that has only one character in between (a.p). I not only understand this, but it's also easy to extend: Looking for a and p with two characters in between is a..p.

Where I could see being even more successful is by using Replace in Files more. When you open Replace in Files there's a Use Regular Expressions option tucked in under Find Options. Checking off that option enables the button at the end of the "Find what" text box. I like that button because clicking on it produces a quick study guide for regular expression newbies like me. I could do this.

I mean: it's certainly possible that I could learn something new. Unlikely, but possible.

Posted by Peter Vogel on 05/30/2019


comments powered by Disqus

Featured

  • ASP.NET Core and Blazor Dominate 'Relatively Small' .NET 6 Preview 6

    In what Microsoft called a “relatively small” release, .NET 6 Preview 6 delivered its biggest set of updates to ASP.NET Core and Blazor. New features include required component parameters, JavaScript interop enhancements, and support for state persistence in Blazor Server apps. Other areas like .NET MAUI and EF Core saw targeted improvements focused on UI styling, accessibility, and standardized configuration conventions. Visual Studio 2022 Preview 2 is now officially supported, enabling key tools like .NET MAUI development and C# Hot Reload.

  • GitHub Copilot Is Rising All-Time Contributor to .NET MAUI Repo

    The .NET MAUI team is pursuing a dream scenario where GitHub Copilot handles a straightforward issue all by itself with just minimal initial instructions.

  • Kernel Ridge Regression with Stochastic Gradient Descent Training Using C#

    Dr. James McCaffrey presents a complete end-to-end demonstration of the kernel ridge regression technique to predict a single numeric value. The demo uses stochastic gradient descent, one of two possible training techniques. There is no single best machine learning regression technique. When kernel ridge regression prediction works, it is often highly accurate.

  • VS Code v1.102 Doubles Down on GitHub Copilot and AI-Enhanced Development

    VS Code’s June 2025 update supercharges GitHub Copilot with new chat customization tools, smarter inline completions, and an open-source Copilot Chat extension that makes AI-assisted coding more transparent and flexible.

  • Azure Vibe Coding for the Enterprise Masses: Microsoft Partners with Replit

    Replit has partnered with Microsoft to bring its AI-powered, natural language coding platform to Azure, enabling enterprise workers to build and deploy software without writing code—marking a major step toward agentic, no-code application development at scale.

Subscribe on YouTube