This post demonstrates some of my favorite search techniques that work well in VSCode, including some basic RegEx (Regular Expressions) expressions that will help you find exactly what you’re looking for in an unfamiliar code base. We will cover VSCode file type inclusions and exclusions, single-line multi-term searching, conditional searching, and more. RegEx can be intimidating to people who aren’t used to using it, but luckily the RegEx expressions described in this post are very easy to remember and incredibly powerful.
Making Regular Expressions Simple With VerbalExpressions
Regular expressions are not the easiest thing in the world to quickly understand. Most developers only work with regular expressions when they really, really have to.
But what if there was another way?
There is and it’s called VerbalExpressions. VerbalExpressions is a collection of over two dozen repositories and libraries that use plain and simple language to describe a regular expression. In fact the motto they use is, “Regular Expressions made easy”.
VerbalExpressions is a quick and easy way to write complex regular expressions. In this blog, I will use the VerbalExpressions JavaScript implementation as my library of choice to demonstrate this great tool to you.