Home > Mobile >  What Is The Character For A Wildcard While Searching In VSCode
What Is The Character For A Wildcard While Searching In VSCode

Time:11-19

I'm deobfuscating some code and I forget the operator to use a wildcard while searching for text in VSCode. By this I mean in VSCode whenever you search for code (CMD/CTRL F), what is the character for a wild card (i.e searching for "date{WILDCARD HERE}" would return "date1","date2","date", etc.)

CodePudding user response:

I don't recall a wildcard option (I've never used it at least). But the search feature supports using regular expressions.

Given your examples of date1, date2, date, etc. assuming it followed a pattern of date<n> where n is a number (or nothing in the case of just "date"), the regular expression of date[1-9]* should achieve what you want.

You can test the expression out on this site. Input the regular expression and some sample data and see how it matches.

  • Related