TEXTAFTER

TEXTAFTER 函數會傳回由在原始字串值中指定子字串後顯示的所有字元組成的字串值。

TEXTAFTER(來源字串, 搜尋字串, 次數)

來源字串: 任何值

搜尋字串: 要搜尋的字串值。

次數: 代表在來源字串中符合搜尋字串的次數(1 代表第一次符合、2 代表第二次符合…,-1 代表最後一次符合、-2 代表倒數第二次符合…)的值(可留空)。如省略,請設定為 1。

備註

  • 依照預設,如在來源字串中多次符合搜尋字串,TEXTAFTER 會傳回由第一次符合(且不包括)後的文字。

  • 如在來源字串中找不到搜尋字串,或無法找到指定的符合次數,會傳回錯誤。

  • 搜尋字串中允許 REGEX 以進行更複雜的搜尋。

  • 依照預設,該搜尋不會區分大小寫。如要在搜尋中區分大小寫,請將 REGEX 函數用於搜尋字串

範例

=TEXTAFTER("email: email@example.com", "email: ") 會傳回「email@example.com」。

=TEXTAFTER("Extract the text after the last occurrence of text like this.", "text", -1) 會傳回「 like this.」。

=TEXTAFTER("Get all the text after an email like marina@example.com, this.", REGEX("([A-Z0-9a-z._%+-]+)@([A-Za-z0-9.-]+\.[A-Za-z]{2,4})")) 會傳回「, this.」。

=TEXTAFTER("All the text after the table of contents and introduction"," ",5) 會傳回「table of contents and introduction」。

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
有幫助?
字元限制: 250
字元數目上限為 250。
感謝您提供意見。
Morty Proxy This is a proxified and sanitized view of the page, visit original site.