Skip to content

Commit b03689c

Browse files
committed
docs: fix RegExp.sticky example calling unicode, and unicode flag label
1 parent 774a88a commit b03689c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Core__RegExp.resi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,17 +263,17 @@ See [`RegExp.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Re
263263
## Examples
264264
```rescript
265265
let regexp1 = RegExp.fromStringWithFlags("\\w+", ~flags="g")
266-
Console.log(regexp1->RegExp.unicode) // Logs `false`, since `y` is not set
266+
Console.log(regexp1->RegExp.sticky) // Logs `false`, since `y` is not set
267267
268268
let regexp2 = RegExp.fromStringWithFlags("\\w+", ~flags="my")
269-
Console.log(regexp2->RegExp.unicode) // Logs `true`, since `y` is set
269+
Console.log(regexp2->RegExp.sticky) // Logs `true`, since `y` is set
270270
```
271271
*/
272272
@get
273273
external sticky: t => bool = "sticky"
274274

275275
/**
276-
`unicode(regexp)` returns whether the unicode (`y`) flag is set on this `RegExp`.
276+
`unicode(regexp)` returns whether the unicode (`u`) flag is set on this `RegExp`.
277277
278278
See [`RegExp.unicode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) on MDN.
279279

0 commit comments

Comments
 (0)