Skip to content

Instantly share code, notes, and snippets.

@willettk
Created December 11, 2013 22:14
Show Gist options
  • Save willettk/7919434 to your computer and use it in GitHub Desktop.
Save willettk/7919434 to your computer and use it in GitHub Desktop.
Perl snippet for extracting matched patterns from file. Necessary since grep no longer supports -P option. See http://what-if.xkcd.com/75/
perl -nle'print $& if m{\b([yuiophjklbnm]+( |$)){3}' chatlines.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment