|
| 1 | +Complete src/CompletionRegexp.res 1:17 |
| 2 | +posCursor:[1:17] posNoWhite:[1:16] Found expr:[1:3->0:-1] |
| 3 | +Completable: Cpath Value[emailPattern]-> |
| 4 | +Package opens Stdlib.place holder Pervasives.JsxModules.place holder |
| 5 | +Resolved opens 1 Stdlib |
| 6 | +ContextPath Value[emailPattern]-> |
| 7 | +ContextPath Value[emailPattern] |
| 8 | +Path emailPattern |
| 9 | +CPPipe pathFromEnv:Stdlib.RegExp found:false |
| 10 | +Path Stdlib.RegExp. |
| 11 | +[{ |
| 12 | + "label": "RegExp.lastIndex", |
| 13 | + "kind": 12, |
| 14 | + "tags": [], |
| 15 | + "detail": "t => int", |
| 16 | + "documentation": {"kind": "markdown", "value": "\n`lastIndex(regexp)` returns the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `0` to the console\n\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `4` to the console\n```\n"} |
| 17 | + }, { |
| 18 | + "label": "RegExp.setLastIndex", |
| 19 | + "kind": 12, |
| 20 | + "tags": [], |
| 21 | + "detail": "(t, int) => unit", |
| 22 | + "documentation": {"kind": "markdown", "value": "\n`setLastIndex(regexp, index)` set the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nregexp->RegExp.setLastIndex(4)\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `10` to the console\n```\n"} |
| 23 | + }, { |
| 24 | + "label": "RegExp.sticky", |
| 25 | + "kind": 12, |
| 26 | + "tags": [], |
| 27 | + "detail": "t => bool", |
| 28 | + "documentation": {"kind": "markdown", "value": "\n`sticky(regexp)` returns whether the sticky (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `y` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"my\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `y` is set\n```\n"} |
| 29 | + }, { |
| 30 | + "label": "RegExp.ignore", |
| 31 | + "kind": 12, |
| 32 | + "tags": [], |
| 33 | + "detail": "t => unit", |
| 34 | + "documentation": {"kind": "markdown", "value": "\n `ignore(regExp)` ignores the provided regExp and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n"} |
| 35 | + }, { |
| 36 | + "label": "RegExp.exec", |
| 37 | + "kind": 12, |
| 38 | + "tags": [], |
| 39 | + "detail": "(t, string) => option<Result.t>", |
| 40 | + "documentation": {"kind": "markdown", "value": "\n`exec(regexp, string)` executes the provided regexp on the provided string, optionally returning a `RegExp.Result.t` if the regexp matches on the string.\n\nSee [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```\n"} |
| 41 | + }, { |
| 42 | + "label": "RegExp.ignoreCase", |
| 43 | + "kind": 12, |
| 44 | + "tags": [], |
| 45 | + "detail": "t => bool", |
| 46 | + "documentation": {"kind": "markdown", "value": "\n`ignoreCase(regexp)` returns whether the ignore case (`i`) flag is set on this `RegExp`.\n\nSee [`RegExp.ignoreCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.ignoreCase) // Logs `false`, since `i` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.ignoreCase) // Logs `true`, since `i` is set\n```\n"} |
| 47 | + }, { |
| 48 | + "label": "RegExp.global", |
| 49 | + "kind": 12, |
| 50 | + "tags": [], |
| 51 | + "detail": "t => bool", |
| 52 | + "documentation": {"kind": "markdown", "value": "\n`global(regexp)` returns whether the global (`g`) flag is set on this `RegExp`.\n\nSee [`RegExp.global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.global) // Logs `true`, since `g` is set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.global) // Logs `false`, since `g` is not set\n```\n"} |
| 53 | + }, { |
| 54 | + "label": "RegExp.multiline", |
| 55 | + "kind": 12, |
| 56 | + "tags": [], |
| 57 | + "detail": "t => bool", |
| 58 | + "documentation": {"kind": "markdown", "value": "\n`multiline(regexp)` returns whether the multiline (`m`) flag is set on this `RegExp`.\n\nSee [`RegExp.multiline`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.multiline) // Logs `false`, since `m` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mi\")\nConsole.log(regexp2->RegExp.multiline) // Logs `true`, since `m` is set\n```\n"} |
| 59 | + }, { |
| 60 | + "label": "RegExp.test", |
| 61 | + "kind": 12, |
| 62 | + "tags": [], |
| 63 | + "detail": "(t, string) => bool", |
| 64 | + "documentation": {"kind": "markdown", "value": "\n`test(regexp, string)` tests whether the provided `regexp` matches on the provided string.\n\nSee [`RegExp.test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nif regexp->RegExp.test(\"ReScript is cool!\") {\n Console.log(\"Yay, there's a word in there.\")\n}\n```\n"} |
| 65 | + }, { |
| 66 | + "label": "RegExp.unicode", |
| 67 | + "kind": 12, |
| 68 | + "tags": [], |
| 69 | + "detail": "t => bool", |
| 70 | + "documentation": {"kind": "markdown", "value": "\n`unicode(regexp)` returns whether the unicode (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.unicode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `u` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mu\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `u` is set\n```\n"} |
| 71 | + }, { |
| 72 | + "label": "RegExp.source", |
| 73 | + "kind": 12, |
| 74 | + "tags": [], |
| 75 | + "detail": "t => string", |
| 76 | + "documentation": {"kind": "markdown", "value": "\n`source(regexp)` returns the source text for this `RegExp`, without the two forward slashes (if present), and without any set flags.\n\nSee [`RegExp.source`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source) on MDN.\n\n## Examples\n```rescript\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp->RegExp.source) // Logs `\\w+`, the source text of the `RegExp`\n```\n"} |
| 77 | + }] |
| 78 | + |
0 commit comments