资源描述:
《[Introducing.Regular.Expressions(2012.7)].Michael.Fitzgerald.文字版》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、IntroducingRegularExpressionsMichaelFitzgeraldBeijing•Cambridge•Farnham•Köln•Sebastopol•TokyoIntroducingRegularExpressionsbyMichaelFitzgeraldCopyright©2012MichaelFitzgerald.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,In
2、c.,1005GravensteinHighwayNorth,Sebastopol,CA95472.O’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).Formoreinformation,contactourcorporate/institutional
3、salesdepartment:800-998-9938orcorporate@oreilly.com.Editor:SimonSt.LaurentIndexer:LucieHaskinsProductionEditor:HollyBauerCoverDesigner:KarenMontgomeryProofreader:JulieVanKeurenInteriorDesigner:DavidFutatoIllustrator:RebeccaDemarestJuly2012:FirstEdition
4、.RevisionHistoryfortheFirstEdition:2012-07-10FirstreleaseSeehttp://oreilly.com/catalog/errata.csp?isbn=9781449392680forreleasedetails.NutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,Inc.IntroducingRegul
5、arExpressions,theimageofafruitbat,andrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarks.Wherethosedesignationsappearinthisbook,andO’ReillyMedia,Inc.,wasaw
6、areofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcaps.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorsassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcon-tained
7、herein.ISBN:978-1-449-39268-0[LSI]1341860829TableofContentsPreface.....................................................................vii1.WhatIsaRegularExpression?.............................................1GettingStartedwithRegexpal2MatchingaNorth
8、AmericanPhoneNumber2MatchingDigitswithaCharacterClass4UsingaCharacterShorthand5MatchingAnyCharacter5CapturingGroupsandBackReferences6UsingQuantifiers6QuotingLiterals8ASampleofApplications9WhatYouLearnedinChapter111TechnicalNotes112.Simp