Tag

NFA

1 views collected around this technical thread.

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.

DFANFARegex
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.

DFANFAThompson algorithm
0 likes · 22 min read
Regular Expressions and Finite Automata: Theory, Performance, and Conversion
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.

DFANFAalgorithm optimization
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.

CEPComplex Event ProcessingMulti-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.

CPUJavaNFA
0 likes · 12 min read
Why a Single Regex Can Crash Your Java Service: Understanding NFA Backtracking
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.

CPUJavaNFA
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.

JavaNFARegex
0 likes · 12 min read
Why a Simple Regex Can Crash Your CPU: Understanding NFA Backtracking
High Availability Architecture
High Availability Architecture
Jun 21, 2018 · Fundamentals

Understanding Regex Backtracking and Performance Issues in Java URL Validation

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.

JavaNFARegex
0 likes · 12 min read
Understanding Regex Backtracking and Performance Issues in Java URL Validation
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.

JavaNFAPossessive Quantifier
0 likes · 13 min read
Understanding Catastrophic Backtracking in Java Regular Expressions and How to Fix It