Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
LemonWiki共筆
Search
Search
Appearance
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
MySQL full text search equivalents to Google search
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Google sheet approach === Using [https://support.google.com/docs/answer/3098244?hl=zh-Hant REGEXEXTRACT] function {{exclaim}} case-sensitive!: <table border="1"> <tr> <td></td> <td>A</td> <td>B</td> </tr> <tr> <td>1</td> <td>文章</td> <td>笑傲江湖中嵩山派掌門左冷禪所創掌法,可發出至陰至寒的真氣。左冷禪與任我行比武時,以此功對付吸星大法,使其全身凍僵、天池穴被封;與岳不群比劍奪帥時,左又使出寒冰神掌,與紫霞神功旗鼓相當、不分勝敗。 原文網址:https://kknews.cc/zh-tw/culture/xzaxbq.html</td> </tr> <tr> <td>2</td> <td>關鍵字</td> <td>吸星大法</td> </tr> <tr> <td>3</td> <td>搜尋結果摘要</td> <td>{{kbd | key=<nowiki>=IF(ISERROR(REGEXEXTRACT(LOWER(B1), "(.{10}"&B2&".{10})")), "", REGEXEXTRACT(LOWER(B1), "(.{10}"&B2&".{10})"))</nowiki>}}</td> </tr> </table> 1. English Keyword Version - "AI agent/agents" Create a Google Sheets formula that suggests a title by extracting text leading up to the "AI agent" mention. {{exclaim}} case-insensitive!: <pre> =IF( REGEXMATCH(A2, "(?i)\bAI\s*agents?\b"), REGEXEXTRACT( A2, ".{0,10}(?i)\bAI\s*agents?\b.{0,10}" )&" ...", "" ) </pre> Here's a breakdown of the Google Sheets formula that extracts excerpts containing "AI agent" or "AI agents": The formula has two main parts: # REGEXMATCH to check if the phrase exists # REGEXEXTRACT to get the surrounding context if found Pattern explanation: * `(?i)` makes the match case-insensitive * `\b` ensures word boundaries * `\s*` allows any number of spaces * `s?` makes the 's' optional (matches both singular and plural) The formula will: * Search for "AI agent" or "AI agents" in cell A2 * If found, extract up to 10 characters before and after the match * Add "..." to indicate truncation * Return empty string if no match Will match: * "AI agent" * "AI agents" * "ai Agent" * "Ai AGENTS" * "The AI agent is" * "Multiple AI agents are" Won't match: * "AIagent" * "AImagent" * "AI agentify" 2. Chinese Keyword Version - "AI代理" or "AI 代理" Create a Google Sheets formula that suggests a title by extracting text containing "AI代理". {{exclaim}} case-insensitive!: <pre> =IF( REGEXMATCH(A2, "(?i)\bAI\s*代理"), REGEXEXTRACT( A2, ".{0,10}(?i)\bAI\s*代理.{0,10}" )&" ...", "" ) </pre> Here's a breakdown of the Google Sheets formula that extracts excerpts containing "AI代理": The formula has two main parts: # REGEXMATCH to check if the phrase exists # REGEXEXTRACT to get the surrounding context if found Pattern explanation: * `(?i)` makes the match case-insensitive (affects the "AI" part) * `\b` ensures word boundary before "AI" * `\s*` allows any number of spaces between "AI" and "代理" The formula will: * Search for "AI代理" or "AI 代理" in cell A2 * If found, extract up to 10 characters before and after the match * Add "..." to indicate truncation * Return empty string if no match Will match: * "AI代理" * "AI 代理" * "ai代理" * "ai 代理" * "This is AI代理 system" * "About AI 代理 research" Won't match: * "AI代理人" (AI agent person) * "智能代理" (Intelligent agent) * "代理AI" (Agent AI)
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki共筆:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)