Repository navigation
v0.4.0: Standard Rust Regex Syntax
🚀 Release v0.4.0: Standard Rust Regex Syntax
⚠️ BREAKING CHANGE
Removed the custom "regex:" prefix requirement for regex patterns. Patterns are now tried as regex first, falling back to literal string matching if regex compilation fails.
📝 Key Changes
- Cleaner API: Use standard Rust regex syntax without custom prefixes
- Smart fallback: Invalid regex patterns automatically fall back to literal matching
- Better alignment: Follows Rust ecosystem conventions
- Updated documentation: All examples, tests, and benchmarks updated
- Python bindings: Updated to match new behavior
🔄 Migration Guide
Before (v0.3.0):
let tools = JSONTools::new()
.flatten()
.key_replacement("regex:(User|Admin)_", "")
.execute(data)?;After (v0.4.0):
let tools = JSONTools::new()
.flatten()
.key_replacement("(User|Admin)_", "")
.execute(data)?;Simply remove the "regex:" prefix from all your regex patterns.
⚡ Performance Impact
Negligible (0-3% variation, mostly within noise threshold). Comprehensive benchmarks show no significant performance degradation.
📦 What's Included
- Rust crate:
json-tools-rsv0.4.0 - Python wheels for multiple platforms (Linux, Windows, macOS)
- Source distribution (sdist)