{"Entry":{"collection":"func","key":"regexp-instr","name":"regexp_instr","aliases":[],"metadata":{"changed_in":["19"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"14","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"15"},{"descriptions_changed":true,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":["regexp_instr(string, pattern [, start [, N [, endoption [, flags [, subexpr]]]]]) → integer"],"removed":[]},"status":"changed","to":"19"}],"content_hash":"ec31831a872d610416660340eef2d2d6b04e058eae17e02e7ea1f988e7ff6552","first_version":"15","group":"string","group_label":"String Functions And Operators","groups":["string","matching"],"imported_at":"2026-09-14T21:49:48.66118+08:00","last_version":"20","name":"regexp_instr","name_key":"regexp_instr","position":3028,"present_in":["15","16","17","18","19","20"],"signature":"regexp_instr ( string text, pattern text [, start integer [, N integer [, endoption integer [, flags text [, subexpr integer ] ] ] ] ] ) → integer","signature_count":2,"slug":"regexp-instr","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","summary":"Returns the position within string where the N'th match of the POSIX regular expression pattern occurs, or zero if there is no such match; see Section 9.7.3.1.3.","summary_zh":""}},"Definition":{"Collection":"func","Key":"regexp-instr","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"regexp-instr","SourceRevision":"2026-09-14T13:14:25.684213+00:00@99e6866c","Facts":{"description":"Returns the position within string where the N'th match of the POSIX regular expression pattern occurs, or zero if there is no such match; see Section 9.7.3.","description_html":"Returns the position within \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e where the \u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e'th match of the POSIX regular expression \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e occurs, or zero if there is no such match; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX Regular Expressions\"\u003eSection 9.7.3\u003c/a\u003e.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","slug":"18"},"group":"string","group_label":"String Functions And Operators","lang":"en","layout":"table-new","pages":["functions-string.html"],"prose_only":false,"signatures":[{"description":"Returns the position within string where the N'th match of the POSIX regular expression pattern occurs, or zero if there is no such match; see Section 9.7.3.","description_html":"Returns the position within \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e where the \u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e'th match of the POSIX regular expression \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e occurs, or zero if there is no such match; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX Regular Expressions\"\u003eSection 9.7.3\u003c/a\u003e.","description_zh":"","description_zh_html":"","examples":[{"expr":"regexp_instr('ABCDEF', 'c(.)(..)', 1, 1, 0, 'i')","result":"3"},{"expr":"regexp_instr('ABCDEF', 'c(.)(..)', 1, 1, 0, 'i', 2)","result":"5"}],"html":"\u003ccode class=\"function\"\u003eregexp_instr\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eendoption\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eflags\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003esubexpr\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e ]\u003c/span\u003e ]\u003c/span\u003e ]\u003c/span\u003e ]\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"regexp_instr ( string text, pattern text [, start integer [, N integer [, endoption integer [, flags text [, subexpr integer ] ] ] ] ] ) → integer","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"regexp-instr","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"regexp_instr","Summary":"返回 POSIX 正则表达式pattern在string中第N次匹配的位置；如果没有这样的匹配，则返回零。参见第 9.7.3 节。","BodyHTML":"返回 POSIX 正则表达式\u003cem\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e在\u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e中第\u003cem\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e次匹配的位置；如果没有这样的匹配，则返回零。参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" rel=\"nofollow\"\u003e第 9.7.3 节\u003c/a\u003e。\u003cpre\u003eregexp_instr ( string text, pattern text [, start integer [, N integer [, endoption integer [, flags text [, subexpr integer ] ] ] ] ] ) → integer\u003c/pre\u003e返回 POSIX 正则表达式\u003cem\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e在\u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e中第\u003cem\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e次匹配的位置；如果没有这样的匹配，则返回零。参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" rel=\"nofollow\"\u003e第 9.7.3 节\u003c/a\u003e。","SourceRevision":"1b5ca64c","ContentHash":"061c50ab76dba4c2fb9f5940007c917e901044eb69c4cf163163735ba45c3531","Payload":{"description_zh":"返回 POSIX 正则表达式pattern在string中第N次匹配的位置；如果没有这样的匹配，则返回零。参见第 9.7.3 节。","description_zh_html":"返回 POSIX 正则表达式\u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e在\u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e中第\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e次匹配的位置；如果没有这样的匹配，则返回零。参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX正则表达式\"\u003e第 9.7.3 节\u003c/a\u003e。","signatures":[{"description_zh":"返回 POSIX 正则表达式pattern在string中第N次匹配的位置；如果没有这样的匹配，则返回零。参见第 9.7.3 节。","description_zh_html":"返回 POSIX 正则表达式\u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e在\u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e中第\u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e次匹配的位置；如果没有这样的匹配，则返回零。参见\u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX正则表达式\"\u003e第 9.7.3 节\u003c/a\u003e。","returns":"integer","text":"regexp_instr ( string text, pattern text [, start integer [, N integer [, endoption integer [, flags text [, subexpr integer ] ] ] ] ] ) → integer","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"5ad0b90e39b898d09df7571333d817b0e354cf4826c44be3ae3d2dfdd7544ae4","Text":"regexp_instr ( string text, pattern text [, start integer [, N integer [, endoption integer [, flags text [, subexpr integer ] ] ] ] ] ) → integer","Returns":"integer","Payload":{"description":"Returns the position within string where the N'th match of the POSIX regular expression pattern occurs, or zero if there is no such match; see Section 9.7.3.","description_html":"Returns the position within \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e where the \u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e'th match of the POSIX regular expression \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e occurs, or zero if there is no such match; see \u003ca href=\"/docs/18/functions-matching.html#FUNCTIONS-POSIX-REGEXP\" title=\"9.7.3. POSIX Regular Expressions\"\u003eSection 9.7.3\u003c/a\u003e.","description_zh":"","description_zh_html":"","examples":[{"expr":"regexp_instr('ABCDEF', 'c(.)(..)', 1, 1, 0, 'i')","result":"3"},{"expr":"regexp_instr('ABCDEF', 'c(.)(..)', 1, 1, 0, 'i', 2)","result":"5"}],"html":"\u003ccode class=\"function\"\u003eregexp_instr\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003epattern\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003estart\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eendoption\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eflags\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003esubexpr\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e ]\u003c/span\u003e ]\u003c/span\u003e ]\u003c/span\u003e ]\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"regexp_instr ( string text, pattern text [, start integer [, N integer [, endoption integer [, flags text [, subexpr integer ] ] ] ] ] ) → integer","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
