Tagged articles
NFA
13 articles · Page 1 of 1
This article provides a comprehensive overview of regular expressions, covering their basic syntax, meta‑characters, quantifiers, greedy vs. non‑greedy matching, look‑ahead/behind, capture groups, engine types such as NFA and DFA, performance pitfalls, optimization tips, major flavors (POSIX, PCRE, RE2), and practical examples for password validation and code‑block extraction.
DFANFAcapture groups
0 likes · 37 min read

The article shows how greedy versus lazy regex patterns can differ dramatically in speed, explains that regular expressions are compiled into finite automata, walks through converting regexes to NFAs, transforming them into DFAs, minimizing those DFAs, and illustrates how backtracking and catastrophic backtracking arise, urging developers to grasp automata theory for writing efficient, reliable patterns.
DFANFAThompson algorithm
0 likes · 22 min read

This article explains how Flink's Complex Event Processing (CEP) library implements pattern matching using a nondeterministic finite automaton with matching caches (NFAb), covering its theoretical foundation, construction, state transition semantics, event selection strategies, shared versioned match buffers, and computation state details.
CEPFlinkNFA
0 likes · 9 min read

This article presents a series of algorithmic innovations—including efficient NFA construction, reduced epsilon‑transitions, prefix/suffix optimizations, fast NFA‑to‑DFA conversion, space‑compressed automata, hybrid finite automata, and large‑scale regex matching techniques—designed to improve regular‑expression matching speed and memory usage in deep packet inspection systems.
DFANFAalgorithm optimization
0 likes · 27 min read

The article presents a pure front‑end Complex Event Processing framework that captures user actions, uses an NFA‑based engine to evaluate dynamic strategies, synchronizes data across pages via local storage, and delivers millisecond‑level real‑time user reach on Mini‑program, Web, and Weex platforms.
CEPFront-endMulti-Container
0 likes · 8 min read

The article describes how Xianyu’s recommendation system shifts complex event processing from server‑side Blink to client‑side Python using Flink CEP concepts, detailing the NFA‑based state and transition model, pattern‑building API, aggregation support, achieving sub‑second execution with modest memory, and outlines future optimizations such as NFA persistence, windowing, DSL script generation, and C++/TensorFlow Lite acceleration.
CEPClientSideFlink
0 likes · 13 min read

An unexpected CPU spike in a Java service was traced to a complex URL‑validation regex whose NFA backtracking caused catastrophic performance, and the article explains the regex engine’s behavior, identifies the problematic pattern, and shows how to refactor the expression to eliminate excessive backtracking.
CPUJavaNFA
0 likes · 12 min read

A Java service suffered near‑100% CPU usage because a URL‑validation regular expression caused catastrophic backtracking, and the article explains the NFA engine behavior, identifies the regex flaws, and shows how to rewrite the pattern with possessive quantifiers to dramatically improve performance.
CPUJavaNFA
0 likes · 12 min read

The article explains how a complex Java regular‑expression used for URL validation triggers catastrophic backtracking, causing near‑100% CPU usage, and demonstrates how to analyze, reproduce, and fix the regex by reducing greedy patterns and adding missing characters.
CPUJavaNFA
0 likes · 11 min read

The article examines a Java URL‑validation regex that caused near‑100% CPU usage, explains how Java's NFA engine and backtracking lead to catastrophic performance, and shows how to rewrite the pattern with possessive quantifiers and proper character classes to eliminate the issue.
JavaNFAbacktracking
0 likes · 12 min read

This article analyzes why a seemingly simple Java regular expression for URL validation caused near‑100% CPU usage, explains NFA backtracking, demonstrates the problem with concrete examples, and provides practical fixes and tools to avoid catastrophic regex performance pitfalls.
NFAURL validationbacktracking
0 likes · 12 min read

During a production incident a Java service’s URL‑validation regex caused near‑100 % CPU due to catastrophic backtracking from a greedy domain pattern, which was fixed by adding missing characters to the final class and converting the domain part to a possessive or atomic quantifier, preventing exponential matching.
JavaNFAbacktracking
0 likes · 13 min read

A detailed exploration of how a complex regular expression used for shop‑name validation caused CPU spikes due to catastrophic backtracking, explaining DFA vs NFA engines, greedy, lazy and possessive quantifiers, and offering practical tips to write performant regexes.
DFANFAcatastrophic backtracking
0 likes · 9 min read
