MySQL full text search equivalents to Google search: Difference between revisions

Jump to navigation Jump to search
(+ English issue)
Line 31: Line 31:
* (1) Remove all non-alpha-numeric-characters<ref>[https://stackoverflow.com/questions/6942973/how-to-remove-all-non-alpha-numeric-characters-from-a-string mysql - How to remove all non-alpha numeric characters from a string? - Stack Overflow]</ref> (2) REGEXP word boundaries<ref>[https://stackoverflow.com/questions/18901704/mysql-regexp-word-boundaries-and-double-quotes regex - MySQL REGEXP word boundaries [[:<:]] [[:>:]] and double quotes - Stack Overflow]</ref> e.g. {{kbd | key = <nowiki>(REPLACE(CONVERT(column_name USING ascii), '?', ' ') REGEXP '([[:<:]])AI([[:>:]])')</nowiki>}}
* (1) Remove all non-alpha-numeric-characters<ref>[https://stackoverflow.com/questions/6942973/how-to-remove-all-non-alpha-numeric-characters-from-a-string mysql - How to remove all non-alpha numeric characters from a string? - Stack Overflow]</ref> (2) REGEXP word boundaries<ref>[https://stackoverflow.com/questions/18901704/mysql-regexp-word-boundaries-and-double-quotes regex - MySQL REGEXP word boundaries [[:<:]] [[:>:]] and double quotes - Stack Overflow]</ref> e.g. {{kbd | key = <nowiki>(REPLACE(CONVERT(column_name USING ascii), '?', ' ') REGEXP '([[:<:]])AI([[:>:]])')</nowiki>}}


Cited from [https://dev.mysql.com/doc/refman/5.7/en/regexp.html MySQL :: MySQL 5.7 Reference Manual :: 12.5.2 Regular Expressions]
<pre>
[[:<:]], [[:>:]]
These markers stand for word boundaries. They match the beginning and end of words, respectively. A word is a sequence of word characters that is not preceded by or followed by word characters. A word character is an alphanumeric character in the alnum class or an underscore (_).
</pre>


== Ignore special characters ==
== Ignore special characters ==

Navigation menu