资源描述:
《introducing_regular_expressions.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、www.it-ebooks.infowww.it-ebooks.infoIntroducingRegularExpressionsMichaelFitzgeraldBeijing•Cambridge•Farnham•Köln•Sebastopol•Tokyowww.it-ebooks.infoIntroducingRegularExpressionsbyMichaelFitzgeraldCopyright©2012MichaelFitzgerald.Allrightsreserved.Printedi
2、ntheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,Inc.,1005GravensteinHighwayNorth,Sebastopol,CA95472.O’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).
3、Formoreinformation,contactourcorporate/institutionalsalesdepartment:800-998-9938orcorporate@oreilly.com.Editor:SimonSt.LaurentIndexer:LucieHaskinsProductionEditor:HollyBauerCoverDesigner:KarenMontgomeryProofreader:JulieVanKeurenInteriorDesigner:DavidFut
4、atoIllustrator:RebeccaDemarestJuly2012:FirstEdition.RevisionHistoryfortheFirstEdition:2012-07-10FirstreleaseSeehttp://oreilly.com/catalog/errata.csp?isbn=9781449392680forreleasedetails.NutshellHandbook,theNutshellHandbooklogo,andtheO’Reillylogoareregist
5、eredtrademarksofO’ReillyMedia,Inc.IntroducingRegularExpressions,theimageofafruitbat,andrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarks.Wherethosedesigna
6、tionsappearinthisbook,andO’ReillyMedia,Inc.,wasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcaps.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorsassumenoresponsibilityforerrorsoromissions,orfordama
7、gesresultingfromtheuseoftheinformationcon-tainedherein.ISBN:978-1-449-39268-0[LSI]1341860829www.it-ebooks.infoTableofContentsPreface.....................................................................vii1.WhatIsaRegularExpression?......................
8、.......................1GettingStartedwithRegexpal2MatchingaNorthAmericanPhoneNumber2MatchingDigitswithaCharacterClass4UsingaCharacterShorthand5MatchingAnyCharacter5CapturingGroupsandBackReferences6UsingQuantifiers6QuotingLiteral