Tagged articles
string matching
22 articles · Page 1 of 1
This article introduces Python's regular expression engine, explains the special characters ^, ., and * with clear examples, and demonstrates how they can be used to match and extract specific patterns in web‑scraped text.
Pythonre moduleregex
0 likes · 5 min read

This guide explains how to use PHP’s preg_match function for basic string matching, demonstrates common regex patterns such as character ranges and quantifiers, and provides a detailed example for validating email addresses, helping developers apply regular expressions effectively in their backend code.
email-validationpreg_matchregex
0 likes · 3 min read

Learn how to efficiently clean and deduplicate textual data using Python's fuzzywuzzy library, covering Levenshtein distance fundamentals, installation, three core matching functions, advanced process extraction, and real-world code examples for handling messy Chinese strings and standardizing company names.
LevenshteinPythondata cleaning
0 likes · 7 min read

This article explains the Knuth-Morris-Pratt (KMP) string‑matching algorithm, describes how the next array is built to capture prefix‑suffix information, shows Java implementations of the search and next‑array construction, and discusses common optimizations to reduce redundant comparisons.
AlgorithmJavaKMP
0 likes · 9 min read

This article introduces PHP's preg_match function, demonstrates simple and complex regular expression examples—including string and email matching—and explains common regex patterns, showing how to perform powerful and flexible text matching in backend development.
preg_matchregexstring matching
0 likes · 4 min read

This article introduces the FuzzyWuzzy Python library, explains its Levenshtein‑based matching functions (Ratio, Partial Ratio, Token Sort Ratio, Token Set Ratio) and the process module, and demonstrates practical applications for fuzzy matching of company and province names with complete code examples.
Levenshtein distancePandasPython
0 likes · 10 min read

This article walks through a Python regular‑expression solution for matching semi‑finished product identifiers like “半成品(广州)1#” or “半成品(北京)2#”, explaining the pattern, its components, and how to apply it in practice.
PatternPythonprogramming
0 likes · 4 min read

This article introduces the FuzzyWuzzy Python library, explains its Levenshtein‑based matching functions such as Ratio, Partial Ratio, Token Sort Ratio and Token Set Ratio, demonstrates how to install it, and provides practical code examples for merging company and province fields with fuzzy matching thresholds.
Pandasdata cleaningstring matching
0 likes · 10 min read

This tutorial explains how to use the Python FuzzyWuzzy library, which relies on Levenshtein distance, to perform fuzzy string matching for tasks such as normalizing province or company names, and provides complete code examples and practical applications.
LevenshteinPandasdata cleaning
0 likes · 10 min read

This article introduces common graph concepts and several advanced string‑matching algorithms—including Brute‑Force, Rabin‑Karp, KMP, Boyer‑Moore, AC automaton, Trie, and Double‑Array Trie—explaining their principles, implementations, complexity analyses, and typical application scenarios for search systems.
AlgorithmsKMPTrie
0 likes · 20 min read

This article introduces the FuzzyWuzzy Python library, explains its Levenshtein‑based matching functions, shows how to install it, and provides step‑by‑step code examples for fuzzy matching of company and province names using pandas dataframes.
Levenshteinfuzzywuzzystring matching
0 likes · 10 min read

This article introduces the KMP string‑matching algorithm, explains its practical scenarios, details the construction and purpose of the Next array, provides a step‑by‑step Python implementation, and analyzes its linear‑time complexity for efficient pattern searching.
AlgorithmKMPNext array
0 likes · 10 min read

This article explains the Boyer‑Moore string‑matching algorithm, detailing how the bad‑character and good‑suffix heuristics dramatically reduce comparisons, and provides a complete Java implementation with step‑by‑step illustrations of each matching round and the underlying shift calculations.
AlgorithmBoyer-MooreJava
0 likes · 6 min read

This article explains the brute‑force (BF) substring search algorithm, demonstrates its step‑by‑step operation with examples, then introduces a simple hash‑based sliding‑window method (a basic Rabin‑Karp approach), provides Java code, and shows how to compute and update hashes efficiently to locate a pattern in a main string.
AlgorithmHashJava
0 likes · 7 min read

This article explains the Brute‑Force (BF), Boyer‑Moore (BM), and Knuth‑Morris‑Pratt (KMP) string‑matching algorithms, illustrates their operation with step‑by‑step visual examples, discusses the inefficiencies of BF, the shift rules of BM, and the prefix‑suffix logic of KMP, and provides a complete Java implementation including the construction of the next array.
AlgorithmBoyer-MooreJava
0 likes · 10 min read

This article introduces the fundamentals of regular expressions, explains their components, syntax rules such as quantifiers and anchors, and provides a collection of frequently used regex patterns for tasks like email validation, ID numbers, dates, IP addresses, and URLs.
pattern syntaxregexregular expressions
0 likes · 5 min read

This article introduces Python's re module, explaining regular expression fundamentals, key functions such as match, search, compile, sub, findall, finditer, and split, detailing their syntax, parameters, flags, and providing numerous code examples to illustrate pattern matching, searching, replacing, and splitting strings.
re moduleregexstring matching
0 likes · 17 min read

This article explains the KMP string‑matching algorithm, how it builds the prefix (next) table to avoid the O(M·N) worst‑case of naive search, provides JavaScript implementations, compares it with Boyer‑Moore and V8's indexOf strategy, and includes detailed code examples.
AlgorithmKMPPrefix Table
0 likes · 10 min read

This article explains how to use a trie (prefix tree) to efficiently filter sensitive words in a text, covering the basic concepts, construction steps, traversal algorithm, complexity analysis, and a Java implementation using HashMap.
JavaSensitive Word FilteringTrie
0 likes · 9 min read

This article explains the meanings and differences of Python regex tokens \w and \W, demonstrates how they match various characters through step‑by‑step examples, and shows why \w fails with symbols like hyphens while \W succeeds, helping readers master practical regex usage.
Pythonregexstring matching
0 likes · 5 min read

This article explains the meanings of Python regex tokens \w and \W, compares them with the dot operator, and demonstrates their behavior through eight step-by-step examples with visual code screenshots to help readers master pattern matching.
PythonTutorialregex
0 likes · 5 min read

This article introduces several classic string‑matching algorithms—including Brute‑Force, KMP, Boyer‑Moore, BMH, Sunday, Shift‑And/Or, and bitmap techniques—explaining their principles, preprocessing steps, and practical considerations for improving text search performance.
AlgorithmsBoyer-MooreKMP
0 likes · 12 min read
