Skip to content

Commit 33d1456

Browse files
authored
Fix syntax for alternation
1 parent b38f542 commit 33d1456

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ val generator: Gen[String] = RegexpGen.from("[1-9]\\d?(,\\d{3})+")
3030
| Default Classes | `\w`, `\d`, `\S`, `.` | These are treated as predefined character classes |
3131
| Quantifiers | `a?`, `b+`, `c*`, `d{3}`, `e{4,5}`, `f{5,}` | These use `Gen.listOfN` to create sized lists of the preceding term |
3232
| Groups | `(abc)`, `(?:def)` | Backreferences are not supported, groups can only be used for grouping terms |
33-
| Alternates | `abc`, `a(bc)d` | Alternates are also transformed with `Gen.oneOf` |
33+
| Alternates | `a\|b\|c`, `a(b\|c)d` | Alternates are also transformed with `Gen.oneOf` |
3434
| Boundaries | `^`, `$`, `\b` | Although these will be parsed they do not modify the generator output |
3535

3636
##### Unsupported syntax
@@ -58,4 +58,4 @@ cases and in certain circumstances your tests may fail. Try to refactor out nega
5858
* In character classes each option is given equal weighting. If you'd prefer to weight a
5959
particular entry you can add it multiple times, this is made easier with string interpolation:
6060
```s"[${"a-z"*5}\s]"```. In the example case the generator is 5 times more likely to generate
61-
an alpha character than a space.
61+
an alpha character than a space.

0 commit comments

Comments
 (0)