zhztheplayer / Dfa Regex
Licence: other
A DFA regex engine in java.
Stars: ✭ 34
Programming Languages
java
68154 projects - #9 most used programming language
Labels
Projects that are alternatives of or similar to Dfa Regex
Notepad
[iOS] A fully themeable markdown editor with live syntax highlighting.
Stars: ✭ 705 (+1973.53%)
Mutual labels: regex
Verbalex
A library for creating complex, composable regular expressions with the reader & writer in mind. 🔍
Stars: ✭ 26 (-23.53%)
Mutual labels: regex
Androidutilcode
AndroidUtilCode 🔥 is a powerful & easy to use library for Android. This library encapsulates the functions that commonly used in Android development which have complete demo and unit test. By using it's encapsulated APIs, you can greatly improve the development efficiency. The program mainly consists of two modules which is utilcode, which is commonly used in development, and subutil which is rarely used in development, but the utils can be beneficial to simplify the main module. 🔥
Stars: ✭ 30,239 (+88838.24%)
Mutual labels: regex
Commonregex
🍫 A collection of common regular expressions for Go
Stars: ✭ 733 (+2055.88%)
Mutual labels: regex
Chr
🔤 Lightweight R package for manipulating [string] characters
Stars: ✭ 18 (-47.06%)
Mutual labels: regex
Sketch Find And Replace
Sketch plugin to do a find and replace on text within layers
Stars: ✭ 693 (+1938.24%)
Mutual labels: regex
Uc Davis Cs Exams Analysis
📈 Regression and Classification with UC Davis student quiz data and exam data
Stars: ✭ 33 (-2.94%)
Mutual labels: regex
Shallow Clone
Make a shallow clone of an object, array or primitive.
Stars: ✭ 23 (-32.35%)
Mutual labels: regex
Comby
A tool for structural code search and replace that supports ~every language.
Stars: ✭ 912 (+2582.35%)
Mutual labels: regex
Py regular expressions
Learn Python Regular Expressions step by step from beginner to advanced levels
Stars: ✭ 770 (+2164.71%)
Mutual labels: regex
Regex Assert Symfony
Common Regex to use with Assert in Symfony's entity
Stars: ✭ 5 (-85.29%)
Mutual labels: regex
Hyper Match
HyperTerm extension which matches regular expressions with predefined commands
Stars: ✭ 15 (-55.88%)
Mutual labels: regex
Ripgrep
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
Stars: ✭ 28,564 (+83911.76%)
Mutual labels: regex
Whitespace Regex
Regular expression for matching the whitespace in a string.
Stars: ✭ 9 (-73.53%)
Mutual labels: regex
Cryptocurrency Address Detector
Detect which cryptocurrency an address corresponds to.
Stars: ✭ 30 (-11.76%)
Mutual labels: regex
Regex
A sane interface for php's built in preg_* functions
Stars: ✭ 909 (+2573.53%)
Mutual labels: regex
DFA-Regex
A DFA regex engine in java.
Pom Settings
<dependency>
<groupId>top.yatt.dfargx</groupId>
<artifactId>dfargx</artifactId>
<version>0.2.1</version>
</dependency>
Introduction
This is a Java DFA regex engine implementation.
- High compatibility -- single jar lib, without 3rd dependencies
- High performance -- O(n) liner time complex, can be used for avoiding ReDoS
Use Case
RegexMatcher matcher = new RegexMatcher("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
boolean result = matcher.match("192.168.0.255"); // return true or false, should be true in this case.
Performance Comparison With JDK Regex:
Below is showing a typical ReDoS attack input against a fragile regex pattern.
Regex | Input | Time Cost (Java Native) | Time Cost (DFA Regex) |
---|---|---|---|
(a*)* | aaaaaaaaaaaaaaaaab | 42ms | 12ms |
(a*)* | aaaaaaaaaaaaaaaaaaaaaaab | 311ms | 1ms |
(a*)* | aaaaaaaaaaaaaaaaaaaaaaaaaaaab | 9579ms | 1ms |
Supported Features:
- matching
- searching
- ascii character set
-
*
,+
,?
,{x}
,{x,y}
,{x}
-
.
,\w
,\W
,\s
,\S
,\d
,\D
- complementary set
[^a]
- escape characters
- brackets
Todo List:
- POSIX-Extended Regex syntax support
- Liner time searching
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].