It looks like the function you are looking for is grep . It will invoke the grep utility with the expression you give it and collect the output in an interactive buffer. You can select any of the matching lines in the buffer to go to that line in the file from which the match matches.
For example, if you run M-x grep, you should receive the following prompt in the mini-buffer:
Run grep (like this): grep -n
Then you add the regex pattern and glob that you want to pass grep:
Run grep (like this): grep -n #some-id *.css
#some-id , *.css . , rgrep grep. , , ?