Germanypemistahl/grex
A command-line tool and Rust library with Python bindings for generating regular expressions from user-provided test cases
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository Của Tuần
#1 Repository Của Tuần
#1 Repository Của Tuần
🧪 Tự động sinh regex từ test case với grex — tiết kiệm hàng giờ đối với regex
grex sinh regex chiếu xạ chính xác test case đưa vào.
grex là công cụ dòng lệnh và thư viện Rust (có binding Python) sinh regex tự động từ test case người dùng cung cấp. Dự án là port Rust của regexgen JS do Devon Govett viết, thêm tính năng mới. Regex sinh ra tương thích Perl và Rust regex crate.
✨ Điểm nổi bật
- Sinh regex tự động: nhập test case, ra regex khớp chính xác.
- CLI + thư viện Rust: dùng dòng lệnh hoặc tích hợp vào code Rust.
- Hỗ trợ Python: binding Python cho dự án Python.
- Regex ngắn nhất: thuật toán tìm regex ngắn nhất cho test case.
- Tùy chỉnh qua flag: biến regex chiếu xạ hẹp thành chung hơn.
- Escape ký tự phi ASCII: hỗ trợ ký tự Unicode.
- Phát hiện prefix/suffix chung: tối ưu regex bằng cách gộp chuỗi lặp lại.
- Alternation và optionality: hỗ trợ
|và?tự động.
💡 Vì sao đáng chú ý
grex giải quyết nhu cầu nhanh chóng có regex đúng từ test case mẫu, tránh viết thủ công lẻn khó. Phù hợp dev cần regex nhanh cho validation, parsing, testing. Tuy nhiên grex không thay thế kỹ năng regex — regex sinh ra cần kiểm tra thủ công nếu cần tối ưu cho engine cụ thể.
#Regex #Rust #CommandLineTool #Python #TiniX
Similar Projects
Discover other similar projects and AI models.
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
A JavaScript / WebAssembly library for generating regular expressions from user-provided test cases
Melody is a language that compiles to regular expressions and aims to be more readable and maintainable
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
A regular expression to match all Emoji-only symbols as per the Unicode Standard.