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.