- Java 9 Regular Expressions
- Anubhava Srivastava
- 144字
- 2021-07-02 18:58:34
Eager matching
At this point, it is important to understand one important behavior of regular expression engines, called eagerness. A regular expression engine performs a match operation from left to right in an input string. While matching a regex pattern against the input string, the regex engine moves from left to right and is always eager to complete a match, even though there are other alternative ways in the regular expression to complete the match. Once a substring is matched, it stops proceeding further and returns the match. Only when a character position fails to match all the possible permutations of the regular expression, then the regex engine moves character by character to attempt a match at the next position in the input string. While evaluating a regex pattern, the regex engine may move backwards (backtrack) one position at a time to attempt matching.
- C# 7 and .NET Core Cookbook
- JavaScript前端開發(fā)模塊化教程
- .NET之美:.NET關鍵技術深入解析
- Mastering RabbitMQ
- Linux C/C++服務器開發(fā)實踐
- 前端跨界開發(fā)指南:JavaScript工具庫原理解析與實戰(zhàn)
- 碼上行動:零基礎學會Python編程(ChatGPT版)
- 從學徒到高手:汽車電路識圖、故障檢測與維修技能全圖解
- Learning Apache Kafka(Second Edition)
- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- Mathematica Data Analysis
- HTML5 APP開發(fā)從入門到精通(微課精編版)
- Learning Ionic
- 自己動手構建編程語言:如何設計編譯器、解釋器和DSL
- 歐姆龍PLC編程指令與梯形圖快速入門