In Scintilla you not just have a current selection (actually multiple), but also a target range. The target range is used to search and replace text without the user seeing this. We also have a FindText() function to perform a search and return the range where text is found. So you can search and show it in user interface.
Search can be done with various flags:
|Default setting is case-insensitive literal match.
|A match only occurs with text that matches the case of the search string.
|A match only occurs if the characters before and after are not word characters as defined by WordChars property.
|A match only occurs if the character before is not a word character as defined by WordChars property.
|The search string should be interpreted as a regular expression. Uses Scintilla's base implementation unless combined with kFindOptionCxx11RegEx to use C++11 version.
When Regular expressions are enabled, you can use the familiar syntax and use \0, \1, \2 and so on in replacement to reference the Nth captured value.
Please try this in the next pre-release.