Skip to content

Instantly share code, notes, and snippets.

@bsa7
Created March 7, 2016 11:21
Show Gist options
  • Save bsa7/6c0651463e52829b91c2 to your computer and use it in GitHub Desktop.
Save bsa7/6c0651463e52829b91c2 to your computer and use it in GitHub Desktop.
grep regexp - perl notation

newest 'perl' notation in regexp instead POSIX style is a better, but grep by default is use a POSIX. Use key -P:

    grep -r -P ':.+?\%\{.+?\}.+?$' config/locales/.

nhis find all strings in Rails localization files where %{...} construction finded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment