File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ A Paper explaining the theoretical background is currently being written.
10
10
The supported Pattern syntax can easily be seen in the ANTLR [ grammar] (
11
11
https://github.com/s4ke/moar/blob/master/engine/src/main/antlr4/com/github/s4ke/moar/regex/parser/Regex.g4 ):
12
12
13
- # Example
13
+ # Examples
14
14
15
15
``` Java
16
16
MoaPattern pattern = MoaPattern . compile(" ^Deterministic|OrNot$" );
@@ -19,3 +19,13 @@ if ( matcher.matches() ) {
19
19
System . out. println(" yay" );
20
20
}
21
21
```
22
+
23
+ Or this cool language:
24
+
25
+ ``` Java
26
+ MoaPattern pattern = MoaPattern . compile(" ((?<y>\\ k<x>)(?<x>\\ k<y>a))+" );
27
+ MoaMatcher matcher = pattern. matcher(" aaaa" );
28
+ if ( matcher. matches() ) {
29
+ System . out. println(" yay again." );
30
+ }
31
+ ```
You can’t perform that action at this time.
0 commit comments