Sign up
Forgot password?
FAQ: Login

Nagy Zsolt. Regex Quick Syntax Reference

  • zip file
  • size 944,25 KB
  • contains epub document(s)
  • added by
  • info modified
Nagy Zsolt. Regex Quick Syntax Reference
Apress, 2018. — 156 p. — ISBN: 1484238753.
This quick guide to regular expressions is a condensed code and syntax reference for an important programming technique. It demonstrates regex syntax in a well-organized format that can be used as a handy reference, showing you how to execute regexes in many languages, including JavaScript, Python, Java, and C#. The Regex Quick Syntax Reference features short, focused code examples that show you how to use regular expressions to validate user input, split strings, parse input, and match patterns. Utilizing regular expressions to deal with search/replace and filtering data for backend coding is also covered.
You won’t find any bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a language reference that is concise and highly accessible. The book is packed with useful information and is a must-have for any programmer.
An Introduction to Regular Expressions
Why Are Regular Expressions Important
What Are Regular Expressions
Frustrations with Regular Expressions Arise from Lack of Taking Action
Regular Expressions Are Imperative
The Language Family of Regular Expressions
Regex Syntax
Formulating an Expression
Literal Characters and Meta Characters
Arbitrary Character Class
Basic Concatenation
Alternative Execution
Operator Precedence and Parentheses
Anchored Start and End
Modifiers
Executing Regular Expressions
Regular Expressions in JavaScript
RegExp Methods
String Methods Accepting Regular Expressions
Regex Modifiers
Global Matches
Multiline Matches
ES6 Unicode Regular Expressions
Sticky Matches
Other PCRE-Based Regex Environments
PHP
Python
Perl
Java
R
C
Ruby
Golang
C
Visualizing Regex Execution Using Finite State Machines
Regular Expressions Are Finite State Machines
Backtracking
Deterministic and Nondeterministic Regex Modeling
Basic Regex Simplifications
A Successful Match Is Cheaper Than Failure
Automatically Generating Regex FSMs
Repeat Modifiers
Backtracking
Match at Least Once
Match at Most Once: Optionals
Match Any Number of Times
Fixed-Range Matching
Loop Exactly n Times
Greedy Repeat Modifiers
Lazy Repeat Modifiers
Possessive Repeat Modifiers
Character Sets and Character Classes
Character Sets
Character Set Ranges
Exclusions from Character Sets
Character Set Classes
Concatenating Advanced Language Constructs
Substring Extraction from Regular Expressions
Defining Capture Groups
Perl 6 Capture Groups
Retrieval of Captured Substrings
JavaScript
PHP
Python
Perl
Reusing Captured Substrings Within a Regex
Capture Groups and Performance
Extensions to Capture Groups
Lookahead and Lookbehind
Lookahead
Lookbehind
Maintaining Regular Expressions
Extended Mode
Regex Subroutines
PCRE Subroutines
Perl 6 Subroutines
Recursion and Circular References with Subroutines
Extended Mode, Subroutines, and Abstractions
Named Capture Groups
EMACS Named Capture Groups
PCRE Named Capture Groups
Perl 6 Named Capture Groups
Case Study: XRegExp Library for JavaScript
Optimizing Regular Expressions
Summary of the Optimization Techniques
Making Character Classes More Specific
Repeating Character Class Loops
Use Possessive Repeat Modifiers Whenever Possible
Use Atomic Groups
Refactor for Optimization
Optimization Techniques Limit Nondeterministic Execution
Parsing HTML Code and URL Query Strings with Regular Expressions
Parsing HTML Tags
Processing the Query String of a URL
Afterword: This Is Not the End, but the Beginning
«What If I Want to Learn More?»
Keep in Touch
  • Sign up or login using form at top of the page to download this file.
  • Sign up
Up