[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-701032-105":59,"doc-detail-701032-en":130,"doc-similar-701032":201},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","regular-expression-pocket-reference-second-edition-quick-syntax-and-pattern-matching-guide","Regular Expression Pocket Reference - Second Edition - Quick syntax and pattern-matching guide","","Regular Expression Pocket Reference, Second Edition provides fast access to regular-expression syntax and pattern-matching operations across widely used programming and tooling environments. Regular expressions are presented as a language for parsing and manipulating text, supporting search-and-replace, validation of well-formed data, and practical use in many editors, applications, databases, and command-line tools. The second edition expands coverage with Ruby and Apache web server, adds common regular expressions, and updates existing language sections while walking through constructs, metacharacters, and examples by implementation.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/regular-expression-pocket-reference-second-edition-quick-syntax-and-pattern-matching-guide/701032/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/regular-expression-pocket-reference-second-edition-quick-syntax-and-pattern-matching-guide/701032.png","ImageObject",300,407,{"name":92,"@type":93},"Finn","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-17","2026-11-12",true,{"@type":102,"interactionType":103,"userInteractionCount":81},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What problem do regular expressions solve in this book?","Question",{"text":112,"@type":113},"Regular expressions are used to parse and manipulate text, perform complex search-and-replace operations, and validate that text data is well-formed.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which programming languages and tools are covered in the second edition?",{"text":117,"@type":113},"The book covers Perl, Java (java.util.regex), .NET and C#, Ruby, Python, PCRE, PHP, Apache web server, vi editor, JavaScript, and shell tools.",{"name":119,"@type":110,"acceptedAnswer":120},"What’s new or expanded in the second edition?",{"text":121,"@type":113},"The second edition adds sections on Ruby and Apache web server, includes common regular expressions, and updates existing language coverage.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},701032,1794522974,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":81,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":145,"preview_urls":146},34359740700684,"https://ap-avatar.wpscdn.com/avatar/1f400023980c374ae676?_k=1777273430885731487","Regular Expression Pocket Reference  \nSECOND EDITION  \nRegular Expression  \nPocket Reference  \nTony Stubblebine  \nBeijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo  \nRegular Expression Pocket Reference, Second Edition  \nby Tony Stubblebine  \nCopyright © 2007, 2003 Tony Stubblebine. All rights reserved. Portions of this book are based on Mastering Regular Expressions, by Jeffrey E. F. Friedl, Copyright © 2006, 2002, 1997 O’Reilly Media, Inc.  \nPrinted in Canada.  \nPublished by O’Reilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.  \nO’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles ([safari.oreilly.com](safari.oreilly.com). For more information, contact our corporate/)[). For more information, contact our corporate/](safari.oreilly.com). For more information, contact our corporate/)[ ](safari.oreilly.com). For more information, contact our corporate/)institutional sales department: (800) 998-9938 or [corporate@oreilly.com](corporate@oreilly.com).  \nEditor: Andy Oram  \nProduction Editor: SumitaMukherji  \nCopyeditor: Genevieve d’Entremont  \nIndexer: Johnna VanHoose Dinse  \nCover Designer: Karen Montgomery  \nInterior Designer: David Futato  \nPrinting History:  \nAugust 2003: First Edition.  \nJuly 2007: Second Edition.  \nNutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Pocket Reference series designations, Regular Expression Pocket Reference, the image of owls, and related trade dress are trademarks of O’Reilly Media, Inc.  \nMany of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps.  \nJava™ is a trademark of Sun Microsystems, Inc. Microsoft Internet Explorer and .NET are registered trademarks of Microsoft Corporation. Spider-Manis a registered trademark of Marvel Enterprises, Inc.  \nWhile every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.  \nISBN-10: 0-596-51427-1  \nISBN-13: 978-0-596-51427-3  \n[T]  \nContents  \nAbout This Book 1  \nIntroduction to Regexes and Pattern Matching 3  \nRegex Metacharacters, Modes, and Constructs 5  \nUnicode Support 13  \nRegular Expression Cookbook 13  \nRecipes 14  \nPerl 5.8 16  \nSupported Metacharacters 17  \nRegular Expression Operators 21  \nUnicode Support 23  \nExamples 24  \nOther Resources 25  \nJava (java.util.regex) 26  \nSupported Metacharacters 26  \nRegular Expression Classes and Interfaces 30  \nUnicode Support 35  \nExamples 36  \nOther Resources 38  \n.NET and C\\# 38  \nSupported Metacharacters 38  \nRegular Expression Classes and Interfaces 42  \nUnicode Support 47  \nExamples 47  \nOther Resources 49  \nPHP 50  \nSupported Metacharacters 50  \nPattern-Matching Functions 54  \nExamples 56  \nOther Resources 58  \nPython 58  \nSupported Metacharacters 58  \nre Module Objects and Functions 61  \nUnicode Support 64  \nExamples 65  \nOther Resources 66  \nRUBY 66  \nSupported Metacharacters 67  \nObject-Oriented Interface 70  \nUnicode Support 75  \nExamples 75  \nJavaScript 77  \nSupported Metacharacters 77  \nPattern-Matching Methods and Objects 79  \nExamples 82  \nOther Resources 83  \nPCRE 83  \nSupported Metacharacters 84  \nPCRE API 89  \nUnicode Support 92  \nExamples 92  \nOther Resources 96  \nApache Web Server 96  \nSupported Metacharacters 96  \nRewriteRule 99  \nMatching Directives 102  \nExamples 102  \nvi Editor 103  \nSupported Metacharacters 103  \nPattern Matching 106  \nExamples 108  \nOther Resources 108  \nShell Tools 109  \nSupported Metacharacters 109  \nOther Resources 114  \nIndex 115  \nRegular Expression Pocket Reference  \nRegular expressions are ","cbCaiqIQT7Mqs2uf","https://ap.wps.com/l/cbCaiqIQT7Mqs2uf","pdf",1026322,128,"English","# About This Book\n# Introduction to Regexes and Pattern Matching\n# Regular Expression Cookbook\n# Perl 5.8\n# Java (java.util.regex)\n# .NET and C#\n# PHP\n# Python\n# Ruby\n# JavaScript\n# PCRE\n# Apache Web Server\n# vi Editor\n# Shell Tools\n# Index","[{\"question\":\"What problem do regular expressions solve in this book?\",\"answer\":\"Regular expressions are used to parse and manipulate text, perform complex search-and-replace operations, and validate that text data is well-formed.\"},{\"question\":\"Which programming languages and tools are covered in the second edition?\",\"answer\":\"The book covers Perl, Java (java.util.regex), .NET and C#, Ruby, Python, PCRE, PHP, Apache web server, vi editor, JavaScript, and shell tools.\"},{\"question\":\"What’s new or expanded in the second edition?\",\"answer\":\"The second edition adds sections on Ruby and Apache web server, includes common regular expressions, and updates existing language coverage.\"}]","Regular Expression Pocket Reference - Second Edition - Quick syntax and pattern-matching guide | PDF",323,13,[147,151,155,159,163,167,171,175,179,183,187,192,197],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/ed473dea32497bc2b6b87e411162b307.webp",983,1415,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/012dbaeb074bf27b76957b3a7187fc98.webp",982,1414,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/803a0bce252e7facc394f0b02e518b2c.webp",981,1412,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/b2568444624bc5485048735d1ff7fa7d.webp",980,1411,{"page_no":24,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/b9efb20121cf6ce4b5c465102f600f8c.webp",979,1409,{"page_no":29,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/90bed5310c28940e2a30c62bd9a78a7f.webp",978,1408,{"page_no":34,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/bc05f2e2c8865b343c4948b6976283ca.webp",977,1406,{"page_no":39,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/a0bd46b7eb1ac471a47f8c4a82f1e0ed.webp",976,1405,{"page_no":44,"url":180,"width":181,"height":182},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/f89a596d1c650e510e38fef3b4cddb6f.webp",975,1403,{"page_no":52,"url":184,"width":185,"height":186},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/627e36e89bf09bea00c859e359b584f4.webp",974,1402,{"page_no":188,"url":189,"width":190,"height":191},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/6360270ac6335f088edcd2a6652fc456.webp",973,1401,{"page_no":193,"url":194,"width":195,"height":196},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/5bdfbea6b1f8468695028cdaa0c78920.webp",972,1399,{"page_no":145,"url":198,"width":199,"height":200},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/d9cf618f31004d1004292052f64fd558.webp",971,1398,{"list":202,"token":66},[203,209,215,221,227,233,239,245,251,257],{"doc_id":204,"doc_title":205,"file_type":137,"home_preview_img_url":206,"slug":207,"view_count":19,"category_name":30,"create_tm":208},701037,"Regular Expressions - Chapter 11 - Python for Everybody","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012047384/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=yetoOah4UOqoBbP%2BhfPj6yqdmBU%3D","regular-expressions-chapter-11-python-for-everybody",1794522981,{"doc_id":210,"doc_title":211,"file_type":137,"home_preview_img_url":212,"slug":213,"view_count":19,"category_name":30,"create_tm":214},701034,"Mastering Regular Expressions - Third Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012047369/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=maVr7dTQ84le2WkOEZyaVHrUxcs%3D","mastering-regular-expressions-third-edition",1794522977,{"doc_id":216,"doc_title":217,"file_type":137,"home_preview_img_url":218,"slug":219,"view_count":81,"category_name":30,"create_tm":220},673340,"Programming Ruby - Pragmatic Programmers' Guide - Second Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229990730381/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=%2Be5Y0%2Bz5kmyZIINeoHoy2Yr1s9I%3D","programming-ruby-pragmatic-programmers-guide-second-edition",1793630701,{"doc_id":222,"doc_title":223,"file_type":137,"home_preview_img_url":224,"slug":225,"view_count":14,"category_name":30,"create_tm":226},673334,"The Ultimate Ruby Cheatsheet - Quick Reference for Writing Ruby Programs","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229990522617/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=4Y8lVOsZiyw6uLDRTeVynqwxZdk%3D","the-ultimate-ruby-cheatsheet-quick-reference-for-writing-ruby-programs",1793630684,{"doc_id":228,"doc_title":229,"file_type":137,"home_preview_img_url":230,"slug":231,"view_count":19,"category_name":30,"create_tm":232},721611,"JavaScript: The Definitive Guide - Sixth Edition - Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024688685/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=ncJPotofNy5qcneqL%2BKI7GASL1w%3D","javascript-the-definitive-guide-sixth-edition-overview",1795060939,{"doc_id":234,"doc_title":235,"file_type":137,"home_preview_img_url":236,"slug":237,"view_count":81,"category_name":30,"create_tm":238},681164,"SWT2_03_Ruby on Rails - Introduction to Ruby on Rails","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229997883762/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=VnmJWV9qGvrn7F8S5c9dg8hThDY%3D","swt2_03_ruby-on-rails-introduction-to-ruby-on-rails",1793940553,{"doc_id":240,"doc_title":241,"file_type":137,"home_preview_img_url":242,"slug":243,"view_count":81,"category_name":30,"create_tm":244},701030,"Regular Expressions - Quick Reference Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011576998/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=uIT64W3cwrNX4S92ogaL%2FGnyJzw%3D","regular-expressions-quick-reference-guide",1794522969,{"doc_id":246,"doc_title":247,"file_type":137,"home_preview_img_url":248,"slug":249,"view_count":19,"category_name":30,"create_tm":250},681162,"Introduction to Ruby on Rails Development - Part 3 - Intro","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229998653470/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=SEuL0LRhNgHnr4Dp76i7af9ZBvM%3D","introduction-to-ruby-on-rails-development-part-3-intro",1793940546,{"doc_id":252,"doc_title":253,"file_type":137,"home_preview_img_url":254,"slug":255,"view_count":19,"category_name":30,"create_tm":256},671798,"Python - Visual QuickStart Guide Table of Contents - Chapter 1 to Appendix B","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988403999/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=r9tflLRo%2BqD5uGiiJjiFnDVKNuQ%3D","python-visual-quickstart-guide-table-of-contents-chapter-1-to-appendix-b",1793580658,{"doc_id":258,"doc_title":259,"file_type":137,"home_preview_img_url":260,"slug":261,"view_count":46,"category_name":30,"create_tm":262},124082,"Short Lessons on Wolfram Language - Programming, Data Processing, Graphics, Machine Learning, and Quantum Computing with Mathematica","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229837087042/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796115179&Signature=CbLCyc0Oz65Tgq6pPrWSfsoMB4Y%3D","short-lessons-on-wolfram-language-programming-data-processing-graphics-machine-learning-and-quantum-computing-with-mathematica",1785820238]