{"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","derived_content_hash":"66b2bfce048de1fc4dfa2593d068114ed0a94abd1569578990734ab6d891a90d","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:14e4ebff0f359a5fa9ca863996e7736cf10e4f4e1f17ed555146494b9aeab946","versions":{"15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"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"],"repair_provenance":{"original_source_revision":"2026-09-14T13:14:25.684213+00:00@99e6866c","receipt_sha256":"ab0604f4e38f592802c8059131d6904a6411d942521d6159b783796805c4b753","repair":"wiki-repair-20261023"},"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":"wiki-repair-20261023:14e4ebff0f359a5fa9ca863996e7736cf10e4f4e1f17ed555146494b9aeab946","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":"wiki-repair-20261023:14e4ebff0f359a5fa9ca863996e7736cf10e4f4e1f17ed555146494b9aeab946","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":"返回 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。","doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","version":"18.7"},{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"7eecd3bb343149124be0476a539f3c682476eab2a15489a0e0ad06fbb769ea9e","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"string","group_label":"字符串函数和操作符","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":"返回 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。","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":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-string.html","sha256":"0446377e0eccc9299099dc4b4b293204c337e3abefcdc396e9698bc54dd1080b"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"regexp-instr","SourceDatabase":"center","Version":"18","Locale":"en","Title":"regexp_instr","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.","BodyHTML":"Returns the position within \u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e where the \u003cem\u003e\u003ccode\u003eN\u003c/code\u003e\u003c/em\u003e\u0026#39;th match of the POSIX regular expression \u003cem\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\" rel=\"nofollow\"\u003eSection 9.7.3\u003c/a\u003e.","SourceRevision":"wiki-repair-20261023:14e4ebff0f359a5fa9ca863996e7736cf10e4f4e1f17ed555146494b9aeab946","ContentHash":"3fe7454918c5201256bdb234fef2aa39add91ea0707c3d58a0ec7e2c4babad11","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.","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":"返回 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。","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":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"10923567ffb2a743fc18bbd5e8b1d25170730d82d33995c353f5a5ac1a1235c6","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":"返回 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。","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":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
