Tagged articles
string parsing
11 articles · Page 1 of 1
This article compares five Java techniques for checking whether a string represents a valid number—including manual character iteration, Integer.parseInt/Double.parseDouble, BigDecimal, regular expressions, and Apache Commons NumberUtils—showing code samples, test cases, and the pros and cons of each method.
Apache CommonsJavaNumber Validation
0 likes · 16 min read

This article explains three common methods—eval, ast.literal_eval, and json.loads—for converting quoted Python strings into executable code or data structures, outlining their advantages, disadvantages, and appropriate use cases.
Securityast.literal_evaldata serialization
0 likes · 5 min read

This article explains the key steps for comparing dot‑separated version strings—ignoring leading zeros, handling different lengths, and performing left‑to‑right numeric comparison—accompanied by a complete Go implementation.
AlgorithmGoVersion Comparison
0 likes · 3 min read

This article walks through a Python regex challenge of extracting strings that start with a specific Chinese prefix, contain six digits, four digits, and the character "号", showing the original issue, code attempts, and the final refined solution using pandas.
PandasPythonregex
0 likes · 5 min read

This article walks through several Python techniques—including list splitting, combined list‑processing methods, and regular‑expression extraction—to efficiently parse mixed text and URL strings, illustrating each approach with code snippets and results.
Pythondata-extractionlist processing
0 likes · 5 min read

This article shows how to pull specific fields from a JSON‑like string obtained during web crawling by applying Python regular expressions or the split() function, providing complete code examples and visual results for each method.
Pythonstring parsing
0 likes · 8 min read

This article explores why standard string‑to‑integer conversions become performance bottlenecks in high‑concurrency scenarios and presents a series of increasingly optimized C++ solutions—from native library calls to loop‑unrolled, byteswap, divide‑and‑conquer, and SIMD tricks—demonstrating dramatic speed gains backed by Google Benchmark results.
C++SIMDbyteswap
0 likes · 16 min read

This article explains PHP's parse_str() function, detailing its syntax, parameters, and return behavior, and provides two practical examples—one with the optional result array and another using the deprecated single‑parameter form—illustrating how to convert query strings into variables.
Backendparse_strstring parsing
0 likes · 3 min read

Learn how to replace complex regular expressions with the Python parse library, covering installation, real-world examples, pattern reuse, type conversion, whitespace handling, case sensitivity, character limits, and custom converters, while showcasing code snippets and practical tips for efficient string parsing.
ParseType Conversionregex-alternative
0 likes · 10 min read

This article explains PHP's parse_str() function, detailing its purpose of converting query strings into variables, describing its parameters and void return, and providing clear code examples demonstrating both basic usage and usage with an output array.
Backendparse_strquery string
0 likes · 2 min read

This article walks through three typical interview coding rounds—implementing a robust string‑to‑int parser, designing a high‑concurrency trace‑storage API, and building a matrix multiplication routine with performance and sparse‑matrix optimizations—providing code examples, corner‑case handling, and improvement ideas.
algorithm optimizationcoding interviewmatrix multiplication
0 likes · 7 min read
