Tagged articles
13 articles
Page 1 of 1
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 2, 2024 · Fundamentals

Understanding Regular Expressions: Syntax, Engines, and Best Practices

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
Understanding Regular Expressions: Syntax, Engines, and Best Practices
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Feb 23, 2023 · Fundamentals

Regular Expressions and Finite Automata: Theory, Performance, and Conversion

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.

BacktrackingDFANFA
0 likes · 22 min read
Regular Expressions and Finite Automata: Theory, Performance, and Conversion
Big Data Technology & Architecture
Big Data Technology & Architecture
Sep 16, 2020 · Big Data

Understanding Flink CEP's NFAb Automaton for Complex Event Processing

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.

Big DataCEPFlink
0 likes · 9 min read
Understanding Flink CEP's NFAb Automaton for Complex Event Processing
DataFunTalk
DataFunTalk
Sep 15, 2020 · Information Security

Optimizing Regular Expression Engines for High‑Performance Deep Packet Inspection

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.

Algorithm OptimizationDFANFA
0 likes · 27 min read
Optimizing Regular Expression Engines for High‑Performance Deep Packet Inspection
Xianyu Technology
Xianyu Technology
May 7, 2020 · Frontend Development

Design and Implementation of a Front-End Complex Event Processing Framework

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
Design and Implementation of a Front-End Complex Event Processing Framework
Xianyu Technology
Xianyu Technology
Feb 11, 2020 · Big Data

Client-side Complex Event Processing with Flink CEP and Python

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
Client-side Complex Event Processing with Flink CEP and Python
Efficient Ops
Efficient Ops
Jan 22, 2020 · Fundamentals

Why a Single Regex Can Crash Your Java Service: Understanding NFA Backtracking

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.

BacktrackingCPUJava
0 likes · 12 min read
Why a Single Regex Can Crash Your Java Service: Understanding NFA Backtracking
IT Architects Alliance
IT Architects Alliance
Nov 25, 2019 · Fundamentals

Why a Complex URL Regex Can Max Out Java CPU and How to Fix It

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.

BacktrackingCPUJava
0 likes · 12 min read
Why a Complex URL Regex Can Max Out Java CPU and How to Fix It
Java Captain
Java Captain
May 20, 2019 · Fundamentals

Understanding Java Regex Backtracking and Its Impact on CPU Usage

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.

BacktrackingCPUJava
0 likes · 11 min read
Understanding Java Regex Backtracking and Its Impact on CPU Usage
Efficient Ops
Efficient Ops
Jun 26, 2018 · Fundamentals

Why a Simple Regex Can Crash Your CPU: Understanding NFA Backtracking

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.

BacktrackingJavaNFA
0 likes · 12 min read
Why a Simple Regex Can Crash Your CPU: Understanding NFA Backtracking
Tencent Cloud Developer
Tencent Cloud Developer
Jun 19, 2018 · Backend Development

Understanding Catastrophic Backtracking in Java Regular Expressions and How to Fix It

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.

BacktrackingJavaNFA
0 likes · 13 min read
Understanding Catastrophic Backtracking in Java Regular Expressions and How to Fix It
Alibaba Cloud Developer
Alibaba Cloud Developer
Aug 25, 2017 · Fundamentals

Avoid Catastrophic Backtracking: How Regex Can Crash Your Server

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
Avoid Catastrophic Backtracking: How Regex Can Crash Your Server