Full text search in HTML ignoring tags / &

You can use window.find() in non-IE browsers and TextRange‘s findText() method in IE. Here’s an example: http://jsfiddle.net/xeSQb/6/ Unfortunately Opera prior to the switch to the Blink rendering engine in version 15 doesn’t support either window.find or TextRange. If this is a concern for you, a rather heavyweight alternative is to use a combination of the … Read more

Search for “whole word match” in MySQL

You can use REGEXP and the [[:<:]] and [[:>:]] word-boundary markers: SELECT * FROM table WHERE keywords REGEXP ‘[[:<:]]rid[[:>:]]’ Update for 2020: (actually 2018+) MySQL updated its RegExp-Engine in version 8.0.4, so you will now need to use the “standard” word boundary marker \b: SELECT * FROM table WHERE keywords REGEXP ‘\\brid\\b’ Also be aware … Read more