IntroductionConventions Used in This BookUsing Code ExamplesSafari® Books OnlineComments and QuestionsAcknowledgmentsFrom John BambenekFrom Agnieszka KlusConceptual OverviewIntroduction to Regular ExpressionsQuotation Marks and Regular ExpressionsMetacharactersPOSIX Character ClassesCrafting a Regular Expressiongrep BasicsBasic Regular Expressions (grep or grep -G)Match ControlGeneral Output ControlOutput Line Prefix ControlContext Line ControlFile and Directory SelectionOther OptionsExtended Regular Expressions (egrep or
grep -E)Fixed Strings (fgrep or grep -F)Perl-Style Regular Expressions (grep -P)Character TypesOctal SearchingCharacter PropertiesPCRE OptionsIntroduction to grep-Relevant Environment VariablesChoosing Between grep Types and Performance ConsiderationsWhen to Use grep -EWhen to Use grep -FWhen to Use grep -PPerformance ImplicationsAdvanced Tips and Tricks with grepBackreferencesBinary File SearchingUseful RecipesIP addressesMAC addressesEmail addressesU.S.-based phone numbersSocial Security numbersCredit card numbersCopyright-protected or confidential materialSearching through large numbers of filesMatching strings across multiple linesReferences