jQuery highlightRegex plugin
by Johann Burkard. Need to be able to do the same thing but with a regular expression? You’re at the right place.
Check out a simple demo here. (source included in this repository).
At this point, it’s very simple:
This would wrap all all vowels inside of #any.jquery.selector with a
To clear the highlighting, just call
$('#any.jquery.selector').highlightRegex(); (with no argument).