Skip to content

Commit ef5a1bb

Browse files
committed
Update README
1 parent 780445d commit ef5a1bb

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

README.md

+47-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,50 @@
33
This repository contains the source code of the Java library for [RegexSolver](https://regexsolver.com) API.
44

55
RegexSolver is a powerful regular expression manipulation toolkit, that gives you the power to manipulate regex as if
6-
they were sets.
6+
they were sets.
7+
8+
## Installation
9+
10+
### Requirements
11+
12+
- Java >=11
13+
14+
### Maven
15+
16+
```xml
17+
18+
<dependency>
19+
<groupId>com.regexsolver.api</groupId>
20+
<artifactId>RegexSolver</artifactId>
21+
<version>1.0.0</version>
22+
</dependency>
23+
```
24+
25+
### Gradle
26+
27+
```groovy
28+
implementation "com.regexsolver.api:RegexSolver:1.0.0"
29+
```
30+
31+
## Usage
32+
33+
In order to use the library you need to generate an API Token on our [Developer Console](https://regexsolver.com/).
34+
35+
```java
36+
public class Main {
37+
public static void main(String[] args) throws IOException, ApiError {
38+
RegexSolverApiWrapper.initialize(/* Your API token here -> */"");
39+
40+
Term term1 = Term.Regex.of("(abc|de|fg){2,}");
41+
Term term2 = Term.Regex.of("de.*");
42+
Term term3 = Term.Regex.of(".*abc");
43+
44+
Term term4 = Term.Regex.of(".+(abc|de).+");
45+
46+
Term result = term1.intersection(term2, term3)
47+
.subtraction(term4);
48+
49+
System.out.println(result);
50+
}
51+
}
52+
```

0 commit comments

Comments
 (0)