Skip to content

Commit 83c15ad

Browse files
committed
2 parents a6d1776 + a667bb6 commit 83c15ad

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A Paper explaining the theoretical background is currently being written.
1010
The supported Pattern syntax can easily be seen in the ANTLR [grammar](
1111
https://github.com/s4ke/moar/blob/master/engine/src/main/antlr4/com/github/s4ke/moar/regex/parser/Regex.g4):
1212

13-
# Example
13+
# Examples
1414

1515
```Java
1616
MoaPattern pattern = MoaPattern.compile("^Deterministic|OrNot$");
@@ -19,3 +19,13 @@ if ( matcher.matches() ) {
1919
System.out.println("yay");
2020
}
2121
```
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+
```

0 commit comments

Comments
 (0)