Search code examples
regexvisual-studio-codefile-search

how to find a certain named import in vscode


for example I have a following line in some file in my project:

import { Button, Switch, message, notification } from 'antd';

and the following line in another file:

import { Table, notification } from 'antd'; 

How can I use VSCode search to find both of these files? and any other file which also has notification function import from antd, among other functions/components from antd library


Solution

  • import \{.*notification.*from 'antd';