问题描述:

I'm using Atom. I've pressed the ".*" button to turn on regular expressions. I'm trying to search for a string only in a file with a path that contains the "src" directory somewhere in the path. I would expect .*\/src\/.* to work but it doesn't. I've tried a bunch of permutations of this but still no luck.

What am I doing wrong?

Sample path "/Users/me/Development/ui/ui-enduser/src/main/js/config/AppConfiguration.js"

网友答案:

/ is a special character in regular expressions. Try escaping them: \/src\/, or if you want the whole string, ^.*\/src\/.*

相关阅读:
Top