Introduction
Search++ is an enhanced search plugin for Notepad++.
Like Notepad++, Search++ is released under the GNU General Public License (either version 3 of the License, or, at your option, any later version). Some original source code files which are not dependent on Notepad++ are released under the MIT (Expat) license: see individual files for details. Search++ was first released by Randall Joseph Fellmy in 2026; you can find the source code on GitHub.
Search++ uses the C++ Mathematical Expression Toolkit Library (ExprTk) by Arash Partow, which is released under the MIT license; JSON for Modern C++ by Niels Lohmann, which is released under the MIT license; the Boost.Regex library, which is released under the Boost Software License, Version 1.0; and ICU4C, which is released under the Unicode License V3. Search++ was built using NppCppMSVS.
Search++ does not work with versions of Notepad++ older than 8.4.3 (release date 2022-07-08).
The current version of Search++ should be considered preliminary. It still a work in progress: features may be missing, behavior and options may change significantly in future releases, and various things might not yet work as intended or documented. Feedback is most welcome at this stage, so I can learn what works well and what requires improvement.
To install Search++, download the x86 or x64 zip file, depending on whether you're using 32-bit or 64-bit Notepad++, from the latest release on GitHub. Unzip the file to a folder named Search++ (the name must be exactly that, or Notepad++ will not load the plugin) and copy that folder into the plugins directory where Notepad++ is installed (usually C:\Program Files (x86)\Notepad++\plugins for 32-bit versions or C:\Program Files\Notepad++\plugins for 64-bit versions).
This documentation, copyright ©2026 by Randy Fellmy, is provided under the Creative Commons Attribution 4.0 license.
Purpose
I wrote Search++ to bring the extended search capabilities I developed for Columns++ to a more general-purpose and hopefully more user-friendly search. I also wanted to experiment with alternatives to some of the user interface limitations of both native Notepad++ and Columns++ search.
Search++ differs in several significant ways from the search built into Notepad++:
- Search++ can be used as a docking dialog or an ordinary dialog. An advantage of the docking dialog is that search results and context will never wind up hidden behind the dialog. As an ordinary dialog, Search++ can be oriented either horizontally or vertically. By default, Search++ opens docked to the right side of Notepad++. You can change that in the Settings dialog. (As with any docking window in Notepad++, you can float the docking dialog by dragging its title bar into the main Notepad++ area; however, Search++ as a regular dialog, chosen from the Settings dialog, is likely to be ”better behaved” than a floating dockable dialog.)
- The Find and Replace fields in Search++ are Scintilla controls. This allows for easy inclusion and visualization of multiple lines, line ending characters and special characters, as well as zooming the fields as desired. Find and replace text is shown using the same font as in the main Notepad++ editing window.
- Search++ can search within selections (including column selections and multiple selections) and within marked text. Commands are available to Find All (send a list of matches to the Search++ Results window), Select, Mark or Show (hide all lines, then unhide lines with matches and mark the matches).
- Regular expression searches in Search++ perform a fully Unicode-based search using a customized combination of Boost.Regex and ICU4C. In particular, this produces fewer “surprising” results than the native Notepad++ search with Unicode characters above 0xFFFF (including most emoji) and when searching in documents using a DBCS code page (which in Notepad++ can be Chinese, Japanese or Korean files that are in the system default encoding instead of in Unicode).
- Regular expression replacements in Search++ can include numeric calculations. The replacement syntax is similar to the one introduced in Columns++.
Search dialog
Everything Search++ does begins with the Search dialog, which you can open by selecting Search... from the Search++ sub-menu on the Plugins menu. If you use Search++ often, you will probably want to assign a key combination to this using Shortcut Mapper... from the Settings menu in Notepad++.
Search engine selection
At the top of the dialog there are buttons from which you can choose a Plain text search or a Regex (regular expression) search. To the right of those buttons there is a Tools button, which will be described later.
In the preliminary versions there may also be a button labeled ICU. The ICU search is mostly intended for comparison testing during development and will probably be removed before the first stable version. It is a relatively simple-minded implementation of finding (no replacing) in UTF-8 documents only using the regular expression engine built into ICU4C.
A Plain text search is simple: it looks for exactly what you’ve entered in the Find box. Options further down in the dialog let you choose whether to match or ignore case and whether to search only for whole words. Stepwise plain text searches can proceed forward (right and down the page) or backward (left and up the page).
A regular expression (Regex) search allows you to specify a pattern to find and a replacement string that can reference parts of the pattern that matched. The Regular expressions section of this help describes them in detail. Stepwise regular expression searches can only move forward (right and down the page).
The Find and Replace boxes
There are two large text entry areas in the dialog; depending on whether the dialog is oriented vertically or horizontally, they will be near the top and bottom or at the left and right. The top or left one is the Find box and the bottom or right one is the Replace box.
The Find and Replace boxes display centered dots for blanks, a right arrow for a tab, and a symbols for each possible line ending: 🠇 for a new line (Unix style line ending), 🠄 for a carriage return (Macintosh style line ending) and ↩ for a carriage return / new line combination (Windows style line ending). The color of these will be the one specified in your Notepad++ Global Styles for the White space symbol. Other invisible characters will be shown as black boxes with the control character code inside (the same way as in Notepad++ when View | Show Symbol | Show All Characters is checked).
Right-click in the Find or Replace box, or use the Apps key or Shift+F10, to bring up a context menu. A number of useful commands can be found there, along with their keyboard shortcuts:
- Ordinary editing commands (Undo, Redo, Cut, Copy, Paste, Delete, Select All) are available with their customary keyboard shortcuts.
- Wrap submenu: By default, the text in the Find and Replace boxes wraps without regard to word boundaries; you can change that by pressing Ctrl+W to cycle through the choices (character wrap, word wrap and no wrapping) or by using the Wrap commands from the context menu.
- Zoom submenu: You can change the size of text in the Find and Replace boxes by zooming; you can use the Ctrl key with the mouse wheel, Ctrl with the plus and minus keys on the numeric keypad, or the Zoom commands from the context menu.
- Insert/Exchange submenu: Insert selection (Ctrl+I) inserts whatever is selected in the active Notepad++ document into the Find or Replace box. Find 🠆 Replace (Ctrl+F) copies the Find box text to the Replace box. Find 🠄 Replace (Ctrl+R) copies the Replace box text to the Find box. Exchange Find/Replace (Ctrl+E) exchanges the contents of the Find and Replace boxes.
- The bottom section of the context menu lets you select from a history of the last twelve strings you have used for searches.
Search command buttons
There are five search command buttons. Find, Count and Find All are beneath the Find box; Replace and Replace All are beneath the Replace box. Each button has a downward chevron at the right which opens a menu of similar commands you can select instead of the main command on the button.
You can Shift+click an item in the drop-down menu for a command button to perform its action and make it the new direct click action for the button. The first item in each menu is the default action for the button, so you can always reset it whenever you wish.
When Plain text search is selected, you can Shift+click the Find or Replace button to reverse the direction of the search (swap Forward and Backward).
A detailed description of the available commands is provided in the Search commands section of this help.
Search options
The search options are simple checkboxes you can enable or disable. Different options are available for different search engines:
- Match case indicates that the case of letters matters: that is, A is different from a. When this box is not checked, letters match regardless of case (A matches A or a).
- Whole word only indicates matches cannot match only part of a word (e.g., the will not match the “the” in anthem. This option is only available for plain text searches.
- Dot matches line breaks applies only to regular expression searches. It indicates that the period (.) matches any one Unicode code point. When not checked, the period does not match the characters that end lines in Notepad++ (linefeed and carriage return). se
- Free spacing applies only to regular expression searches. It indicates that unescaped “white space” (spaces, tabs and line-endings) and comments (a # sign and all text following it on the same line) in the search string are to be ignored by the regular expression engine, so you can use these characters to make complex search strings easier to read and edit.
- Unicode word boundaries enables the use of a sophisticated definition of word boundaries developed as part of the Unicode Standard. At present this option is only available for the ICU search engine.
Tools
The Tools button opens a menu that offers some convenient actions you might want to use in conjunction with searching:
| Hide All Lines | hides all lines in the active document. |
|---|---|
| Show All Lines | shows all lines in the active document. |
| Add Selection to Marked Text | marks all text currently selected in the active document with the mark style chosen in the Settings dialog. The default marker is the Find Mark Style, the same marker used by the built-in Search|Mark dialog in Notepad++. |
| Select Marked Text | selects all text in the active document that is marked with the mark style chosen in the Settings dialog. Note that this does not add to the current selection; the current selection is lost. |
Copy Marked Text
| copies to the clipboard all text in the active document that is marked with the mark style chosen in the Settings dialog as if it were a single selection. The separator, if any, that will be added between separate runs of marked text is indicated; the default is line breaks, which you can change using the next menu option. |
| Copy Marked Text... | opens a dialog in which you can choose how you would like separate runs of marked text to be separated, and then copies all marked text in the same way as the option above. The separator you choose becomes the new separator for the menu option above. If you choose Custom, you can enter a string of text you prefer: for example, you might want to use a comma followed by a blank to separate items that will go into a list. You can use |
| Copy Marked Text as multiple selections | copies to the clipboard all text in the active document that is marked with the mark style chosen in the Settings dialog as if it were a multiple selection. This affects how the copied text pastes, since it will paste like a column or multiple selection rather than like a single selection. The separator for multiple selections is always a line break. |
| Remove marks from active document | removes from the active document all marks in the mark style chosen in the Settings dialog. |
| Remove marks from multiple documents... | opens a dialog with options to remove all marks in the mark style chosen in the Settings dialog from documents in this view or from all open documents. You might want to use these options along with the Mark in Documents in this View or Mark in Open Documents commands. |
| Clear search results list | removes all results currently accumulated in the search results list. |
| Settings... | opens the Search++ Settings dialog. |
Keyboard navigation
The search dialog responds to the usual methods of keyboard navigation for a dialog (e.g., type an underlined character alone or with the Alt key). In addition, there are six general navigation commands you can use in the search dialog and in the search results window:
| Ctrl+H | Swap keyboard focus between the search dialog and the search results window. If the target dialog or window is not visible, open it. |
|---|---|
| Ctrl+N | Return keyboard focus to the active Notepad++ document. |
| Ctrl+O | If keyboard focus is in the Find box, switch to the Replace box; otherwise, switch focus to the Find box. If focus is in the search results window and the search dialog is not visible, open it. |
| Ctrl+Shift+H | Close the search results window if it is open. If focus was in the search results window, return it to the active Notepad++ document. |
| Ctrl+Shift+N | Close the search dialog and the search results window, and return focus to the active Notepad++ document. |
| Ctrl+Shift+O | Close the search dialog if it is open. If focus was in the search dialog, return it to the active Notepad++ document. |
Status messages
The bottom of the search dialog shows a status message which summarizes the results of the last search command. If the message is too long to fit the width of the search dialog, the status line shows an ellipsis (…) at the right; hover the mouse pointer over the status line to see the entire message in a balloon tip.
Search commands
Search commands are issued by clicking one of the command buttons in the search dialog or by selecting one the entries from the drop-down menus for those buttons. There are three parts to a search command: the action, the extent and the scope.
Search actions
Search actions define what sort of thing a command will do. There are two categories of search actions: stepwise and multiple. Stepwise actions find and/or replace one occurrence at a time; multiple actions search for as many occurrences as possible, under specified constraints, at once:
| Stepwise search actions | |
|---|---|
| Find | finds one occurrence of the search string. The default extent for find commands is forward, starting from the current position or selected text. For plain text searches, Find can also have the Backward extent. |
| Replace (then find) | first finds a match (unless a match has just been found), then on subsequent clicks replaces the match and finds the next match. |
| Replace (then wait) | first finds a match (unless a match has just been found), then the next click replaces the match, leaving the replacement location visible. The next click finds, the next click replaces, and so on. |
| Multiple search actions | |
|---|---|
| Count | shows a message at the bottom of the search dialog telling how many occurrences of the search string were found. |
| Find All | searches for occurrences of the find string and lists them in the Search results window. |
| Select | searches for occurrences of the find string and creates a multiple selection with one selection corresponding to each match. By default, any existing selection is cleared if the search succeeds; you can change this behavior in the Settings dialog. It is possible to Select In Selection. After determining which text is selected, previous selections are cleared when a Select in Selection command succeeds, regardless of the Always clear selections before Select command setting, since the command could accomplish nothing otherwise. |
| Mark | searches for occurrences of the find string and marks the found text. By default, marks already in the document are not cleared; you can change this behavior, and choose which marker is used, in the Settings dialog. It is possible to Mark in Marked Text. After determining which text is marked, all previously marked text is unmarked when a Mark in Marked Text command succeeds, regardless of the Always unmark all text before a mark command setting, since the command could accomplish nothing otherwise. |
| Show | unhides lines containing matches and marks the matches. If no lines are hidden before the command is given, Show first hides all lines. By default, if any lines are already hidden, Show doesn’t hide anything, and it doesn’t unmark existing marked text; you can change this behavior in the Settings dialog. |
| Replace All | searches for occurrences of the find string and replaces them with the replace string. |
Search extents
Search extents describe how the search “extends” from the current position or selection. Stepwise search actions can search forward or (for Plain text searches) Backward. Multiple search actions can search throughout the active document or Before or After the current position or selection. Find All and Mark commands can also search in Open Documents or in Documents in this View:
| Search extents for stepwise search actions | |
|---|---|
| forward | is the default for stepwise search actions: Find, Replace (then find) and Replace (then wait). It means moving from the current position or selection to the right and downward through the document. When a forward command can find nothing (or nothing more), a message at the bottom of the search dialog will indicate that. Clicking the same button again will “wrap around” to the beginning of the search scope (unless you already started from the beginning). |
| Backward | is available for stepwise search actions only when searching for Plain text. It means moving from the current position or selection to the left and upward through the document. When a Backward command can find nothing (or nothing more), a message at the bottom of the search dialog will indicate that. Clicking the same button again will “wrap around” to the end of the search scope (unless you already started from the end). |
| Search extents for multiple search actions | |
|---|---|
| throughout the active document | is the default extension for command actions that search for multiple occurrences at one time. The entire scope (the selection, marked text or the whole document) is searched. This extension is implied unless one of the other extensions is part of the command name. |
| Before | applies the command action only to matches that occur to the left and upward in the active document relative to the current position or selection. The action is not applied to matches which overlap the current position or selection. If there is a single selection which is the result of an immediately preceding stepwise find, or the find step of a stepwise replace, Replace Before includes the found text. This lets you do a series of stepwise backward replaces and then complete them with a Replace Before. |
| After | applies the command action only to matches that occur to the right and downward in the active document relative to the current position or selection. The action is not applied to matches which overlap the current position or selection. If there is a single selection which is the result of an immediately preceding stepwise find, or the find step of a stepwise replace, Replace After includes the found text. This lets you do a series of stepwise replaces and then complete them with a Replace After. |
| Open Documents | searches all documents that are open in any tab in Notepad++. |
| Documents in this View | searches all documents that are open in any tab in the active view. Notepad++ has one or two views. If there is only one view open, Documents in this View is the same as Open Documents. |
Search scopes
Search scopes determine what will be searched: the Selection, Marked Text or the Whole Document. The default is to determine the effective scope based on whether there is already a selection or marked text in the document:
| Search scopes | |
|---|---|
| Selection | only selected text will be searched. Because a Find command, or the preliminary find step in a replace command, selects the found text, subsequent commands won’t be confined to the originally-selected text, since it will no longer be selected. To avoid this, you can use Add Selection to Marked Text from the Tools button menu before searching. For a regular expression search, each line in a rectangular selection and each selection in a multiple selection is searched independently; the search in any line or selection cannot “see” outside that selection. This affects the behavior of assertions (including word boundaries, lookaheads and lookbehinds, ^ and $). |
| Marked Text | only marked text will be searched. For a regular expression search, each run of marked text is searched independently; the search in any span of marked text cannot “see” outside that span. This affects the behavior of assertions (including word boundaries, lookaheads and lookbehinds, ^ and $). |
| Whole Document | selections and marks are ignored; everything in the document (subject to any extent constraint) is searched. |
| default scope | attempts to infer what you probably want to search based on whether anything is already marked or selected. The default rules are these:
You can make various adjustments to the default scope rules in the Settings dialog. |
Search results window
The Find All command and its variants, like Find All in Open Documents or Find All in Marked Text, list the matches found in the Search++ Results window. This is a docking window which, by default, appears at the bottom of the Notepad++ window. Once a search results window is initialized, its content is kept as long as Notepad++ remains open unless you explicitly clear it. Newer Find All commands add results to the top of the window. You can close the window, and if you later reopen it (by doing another Find All command or by pressing Ctrl+H in the search dialog) during the same Notepad++ session, the content will still be there.
Each search is headed by a gold-colored line showing the number of matches and the find string. Below that is a section for each document in which matches were found, beginning with a header line giving the file name and the number of lines in that file that contain matches. Below that, each line which has any matches is listed and the matches are highlighted.
You can double-click on a header line to “fold” the content beneath it; double-click again to open it up.
You can double-click at any position on a match line and the corresponding document will be activated with the caret set to the corresponding position in the document. If you double-click on a highlighted selection, the corresponding selection will be highlighted in the document.
Note that this only works if the document is still open in Notepad++ and has not been modified since the search. If the document is not open, Search++ will not attempt to reopen it. If the document has changed, positions will go “out of sync” and where you double-click will not be where the caret winds up.
The same wrap and zoom options are available as in the Find and Replace boxes. You can right-click or use the Apps key or Shift+F10 to open a context menu, which includes navigation, wrap and zoom options as well as commands to Clear all searches in this list and Clear all searches below this one (that is, searches older than the one in which the caret is positioned).
You can navigate the search results window by keyboard. The Tab key moves to the next match; Shift+Tab moves to the previous match. You can press the Enter key to show the position in the document corresponding to the position of the caret in the search results without moving focus to the document; use Shift+Enter to scroll to location and put focus in the document. You can use Ctrl+Shift+D and Ctrl+D to move to the document headers above or below the current position, and Ctrl+Shift+S and Ctrl+S to move to the search headers above or below the current position.
You can use the general navigation keyboard shortcuts described for the search dialog in the search results window, too.
Regular expressions
Regular expressions are a powerful tool for finding and replacing text using patterns instead of a literal plain text string. Search++ uses the same regular expression engine, Boost.Regex, used in Notepad++, so most things work the same as they do in Notepad++. Two good resources for learning the syntax of find strings and replacements for this engine are the Notepad++ User Manual and the Boost documentation for Find and Replace syntax. This section will concentrate on the differences between Search++ regular expressions and the ones used in the built-in Notepad++ search.
Formulas
Search++ supports mathematical formulas in the replacement string for regular expressions. They are described in the Formulas section of this help.
Searching marked text and searching in rectangular and multiple selections
Search in Notepad++ doesn’t work in rectangular or multiple selections, nor is there a facility for searching in marked text. Search++ can do those things. For plain text the way it works is fairly straightforward; but for regular expressions there are some considerations that might not be obvious.
Within a rectangular selection, the selection in each row is matched independently of the surrounding text. The ^ assertion matches the beginning of the selection within a row, the $ assertion matches the end of the selection, and lookahead and lookbehind assertions cannot examine text past the boundaries of the selection. (Lookbehind assertions in Notepad++ can examine all text back to the beginning of the document, even when counting or replacing in a simple selection.) The same principle applies to multiple selections and to runs of marked text.
The \K directive
Matches for regular expressions using the \K directive are never replaced when performing stepwise Find and Replace in Notepad++. In Search++ such matches can be replaced if you do not change the selection in the document or activate any other document between finding the match and replacing it.
Case sensitivity and named character classes
In most regular expression engines, including unmodified Boost.Regex, case insensitive matches (when the Match case option is not checked, or when (?i) is in effect) ignore case in the text to be matched entirely. In Search++, named character classes and their equivalents (such as [[:upper:]] or \u or \p{Lu}) never ignore case.
Unicode
In documents containing characters outside the ASCII character set there are some significant differences in the way Search++ and Notepad++ match regular expressions. Search++ matches document text as if it were a series of Unicode code points (i.e., UTF-32) while Notepad++ matches documents either as ANSI bytes in the system default code page or as UTF-16 code units. Most of the differences are related to this change.
When using hexadecimal codes (\xhh or \x{hhhh}) to specify a character in Search++ regular expressions, you must use the Unicode code point. Character ranges (e.g., [†-‰]) represent the range of Unicode code points, not the range implied by any code page.
The hexadecimal values for ASCII characters (x00-x7f) are the same in all code pages and in Unicode. There is one partial exception: in some East Asian codepages, ¥, the Yen/Yuan sign, shares the byte value x5c with \, the backslash character. This is a matter of appearance only; the Unicode Yen/Yuan sign, xa5, is not an ASCII character, and the ASCII character x5c functions as a backslash whether it appears as \ or as ¥.
As an example of character ranges, •, the bullet, is included in the Unicode range [†-‰], from the General Punctuation block; but it is not between those two characters in the common Windows-1252 code page. In a regular expression in Search++ that range will match a bullet, even in an ANSI document when the system default code page is Windows-1252. In a Notepad++ search it would not match in an ANSI document, but it would match in a Unicode document.
There are no surrogate pairs in Search++ regular expressions; each code point matches as a single unit. To enter any Unicode character in hexadecimal notation, use the full code point; for example, enter 🙂 as \x{1f642}. (The surrogate pair, \x{d83d}\x{de42}, which must be used in Notepad++ search, will not match in Search++.)
Scintilla, the display control used in Notepad++, represents Unicode internally as UTF-8. (This is true whether the file containing the document is UTF-8, UTF-16 or anything else other than ANSI.) When displaying Unicode documents that contain invalid UTF-8, Scintilla shows each byte that cannot be decoded as a hexadecimal code in reversed colors. You can match any of these bytes with \i; to match a specific byte, use the hexadecimal code Scintilla displays as a symbolic character name, e.g., [[.xF7.]]. (When matching a regular expression, Search++ treats each of these error bytes as if it were the Unicode code point formed by adding 0xdc00 to the invalid byte. These code points are in the surrogate range and are invalid as UTF-32 code units.)
The period (.) matches any one code point except the characters which end lines in Scintilla: carriage return (\x0d or \r) and newline (also called line feed, \x0a or \n). This corresponds to the documented behavior of the period, but not the actual behavior in Notepad++ (where there are several other control characters it does not match). Use \X to match a character including any combining code points (marks) which follow it. (In Notepad++ search, . and \X do not work as expected when the code points involved are outside the basic multilingual plane, that is, 0x10000 or greater.)
The Unicode character classes and these escape sequences, negations (which match characters not in the class) and character classes are added:
| escape | negation | character class | meaning |
|---|---|---|---|
\i | \I | [[:invalid:]] | a byte in an invalid UTF-8 sequence |
\o | \O | [[:ascii:]] | an ASCII character, code points 0 through 127 |
\y | \Y | [[:defined:]] | any Unicode code point that is assigned and is not a surrogate or a private use character |
Some symbolic names for collating elements have been added, including all the abbreviations used to display invisible characters; all can be entered in any mix of upper and lower case. This is the full list:
| expression | code pt | common name |
|---|---|---|
[[.nul.]] | 00 | null |
[[.soh.]] | 01 | start of heading |
[[.stx.]] | 02 | start of text |
[[.etx.]] | 03 | end of text |
[[.eot.]] | 04 | end of transmission |
[[.enq.]] | 05 | enquiry |
[[.ack.]] | 06 | acknowledge |
[[.bel.]][[.alert.]] | 07 | bell |
[[.bs.]][[.backspace.]] | 08 | backspace |
[[.ht.]][[.tab.]] | 09 | horizontal tab |
[[.lf.]][[.newline.]] | 0a | line feed, new line |
[[.vt.]][[.vertical-tab.]] | 0b | line tabulation, vertical tab |
[[.ff.]][[.form-feed.]] | 0c | form feed |
[[.cr.]][[.carriage-return.]] | 0d | carriage return |
[[.so.]] | 0e | shift out |
[[.si.]] | 0f | shift in |
[[.dle.]] | 10 | data link escape |
[[.dc1.]] | 11 | device control one |
[[.dc2.]] | 12 | device control two |
[[.dc3.]] | 13 | device control three |
[[.dc4.]] | 14 | device control four |
[[.nak.]] | 15 | negative acknowledge |
[[.syn.]] | 16 | synchronous idle |
[[.etb.]] | 17 | end of transmission block |
[[.can.]] | 18 | cancel |
[[.em.]] | 19 | end of medium |
[[.sub.]] | 1a | substitute |
[[.esc.]] | 1b | escape |
[[.fs.]][[.IS4.]] | 1c | information separator four |
[[.gs.]][[.IS3.]] | 1d | information separator three |
[[.rs.]][[.IS2.]] | 1e | information separator two |
[[.us.]][[.IS1.]] | 1f | information separator one |
[[.space.]] | 20 | |
[[.exclamation-mark.]] | 21 | ! |
[[.quotation-mark.]] | 22 | " |
[[.number-sign.]] | 23 | # |
[[.dollar-sign.]] | 24 | $ |
[[.percent-sign.]] | 25 | % |
[[.ampersand.]] | 26 | & |
[[.apostrophe.]] | 27 | ' |
[[.left-parenthesis.]] | 28 | ( |
[[.right-parenthesis.]] | 29 | ) |
[[.asterisk.]] | 2a | * |
[[.plus-sign.]] | 2b | + |
[[.comma.]] | 2c | , |
[[.hyphen.]] | 2d | - |
[[.period.]] | 2e | . |
[[.slash.]] | 2f | / |
[[.zero.]] | 30 | 0 |
[[.one.]] | 31 | 1 |
[[.two.]] | 32 | 2 |
[[.three.]] | 33 | 3 |
[[.four.]] | 34 | 4 |
[[.five.]] | 35 | 5 |
[[.six.]] | 36 | 6 |
[[.seven.]] | 37 | 7 |
[[.eight.]] | 38 | 8 |
[[.nine.]] | 39 | 9 |
[[.colon.]] | 3a | : |
[[.semicolon.]] | 3b | ; |
[[.less-than-sign.]] | 3c | < |
[[.equals-sign.]] | 3d | = |
[[.greater-than-sign.]] | 3e | > |
[[.question-mark.]] | 3f | ? |
[[.commercial-at.]] | 40 | @ |
[[.left-square-bracket.]] | 5b | [ |
[[.backslash.]] | 5c | \ |
[[.right-square-bracket.]] | 5d | ] |
[[.circumflex.]] | 5e | ^ |
[[.underscore.]] | 5f | _ |
[[.grave-accent.]] | 60 | ` |
[[.left-curly-bracket.]] | 7b | { |
[[.vertical-line.]] | 7c | | |
[[.right-curly-bracket.]] | 7d | } |
[[.tilde.]] | 7e | ~ |
[[.del.]] | 7f | delete |
[[.pad.]] | 80 | padding character |
[[.hop.]] | 81 | high octet preset |
[[.bph.]] | 82 | break permitted here |
[[.nbh.]] | 83 | no break here |
[[.ind.]] | 84 | index |
[[.nel.]] | 85 | next line |
[[.ssa.]] | 86 | start of selected area |
[[.esa.]] | 87 | end of selected area |
[[.hts.]] | 88 | character (horizontal) tabulation set |
[[.htj.]] | 89 | character (horizontal) tabulation with justification |
[[.lts.]] | 8a | line (vertical) tabulation set |
[[.pld.]] | 8b | partial line forward (down) |
[[.plu.]] | 8c | partial line backward (up) |
[[.ri.]] | 8d | reverse line feed (index) |
[[.ss2.]] | 8e | single-shift two |
[[.ss3.]] | 8f | single-shift three |
[[.dcs.]] | 90 | device control string |
[[.pu1.]] | 91 | private use one |
[[.pu2.]] | 92 | private use two |
[[.sts.]] | 93 | set transmit state |
[[.cch.]] | 94 | cancel character |
[[.mw.]] | 95 | message waiting |
[[.spa.]] | 96 | start of protected area |
[[.epa.]] | 97 | end of protected area |
[[.sos.]] | 98 | start of string |
[[.sgci.]] | 99 | single graphic character introducer |
[[.sci.]] | 9a | single character introducer |
[[.csi.]] | 9b | control sequence introducer |
[[.st.]] | 9c | string terminator |
[[.osc.]] | 9d | operating system command |
[[.pm.]] | 9e | private message |
[[.apc.]] | 9f | application program command |
[[.nbsp.]] | a0 | no-break space |
[[.shy.]] | ad | soft hyphen |
[[.alm.]] | 061c | arabic letter mark |
[[.sam.]] | 070f | syriac abbreviation mark |
[[.ospm.]] | 1680 | ogham space mark |
[[.mvs.]] | 180e | mongolian vowel separator |
[[.nqsp.]] | 2000 | en quad |
[[.mqsp.]] | 2001 | em quad |
[[.ensp.]] | 2002 | en space |
[[.emsp.]] | 2003 | em space |
[[.3/msp.]] | 2004 | three-per-em space |
[[.4/msp.]] | 2005 | four-per-em space |
[[.6/msp.]] | 2006 | six-per-em space |
[[.fsp.]] | 2007 | figure space |
[[.psp.]] | 2008 | punctation space |
[[.thsp.]] | 2009 | thin space |
[[.hsp.]] | 200a | hair space |
[[.zwsp.]] | 200b | zero-width space |
[[.zwnj.]] | 200c | zero-width non-joiner |
[[.zwj.]] | 200d | zero-width joiner |
[[.lrm.]] | 200e | left-to-right mark |
[[.rlm.]] | 200f | right-to-left mark |
[[.ls.]] | 2028 | line separator |
[[.ps.]] | 2029 | paragraph separator |
[[.lre.]] | 202a | left-to-right embedding |
[[.rle.]] | 202b | right-to-left embedding |
[[.pdf.]] | 202c | pop directional formatting |
[[.lro.]] | 202d | left-to-right override |
[[.rlo.]] | 202e | right-to-left override |
[[.nnbsp.]] | 202f | narrow no-break space |
[[.mmsp.]] | 205f | medium mathematical space |
[[.wj.]] | 2060 | word joiner |
[[.(fa).]] | 2061 | function application |
[[.(it).]] | 2062 | invisible times |
[[.(is).]] | 2063 | invisible separator |
[[.(ip).]] | 2064 | invisible plus |
[[.lri.]] | 2066 | left-to-right isolate |
[[.rli.]] | 2067 | right-to-left isolate |
[[.fsi.]] | 2068 | first strong isolate |
[[.pdi.]] | 2069 | pop directional isolate |
[[.iss.]] | 206a | inhibit symmetric swapping |
[[.ass.]] | 206b | activate symmetric swapping |
[[.iafs.]] | 206c | inhibit arabic form shaping |
[[.aafs.]] | 206d | activate arabic form shaping |
[[.nads.]] | 206e | national digit shapes |
[[.nods.]] | 206f | nominal digit shapes |
[[.idsp.]] | 3000 | ideographic space |
[[.zwnbsp.]] | feff | zero-width no-break space |
[[.iaa.]] | fff9 | interlinear annotation anchor |
[[.ias.]] | fffa | interlinear annotation separator |
[[.iat.]] | fffb | interlinear annotation terminator |
[[.sflo.]] | 1bca0 | shorthand format letter overlap |
[[.sfco.]] | 1bca1 | shorthand format continuing overlap |
[[.sfds.]] | 1bca2 | shorthand format down step |
[[.sfus.]] | 1bca3 | shorthand format up step |
[[.x80.]], [[.x81.]],... [[.xff.]] | specific invalid UTF-8 bytes |
Formulas
Formulas are representations of mathematical computations. Search++ uses the ExprTk (Expression Toolkit) package to parse and evaluate formulas.
Replacement syntax
To include a formula in a replacement string, write it as:
(?=formula) or (?=format:formula)
within an ordinary replacement string. (The format option will be explained in a later sub-section.) For example:
Find box: EM(\l)(\d\d\d)
Replace box: EX$1(?=$2+100)v
would replace EMj437 with EXj537v.
Use $1, $2 and so on to represent capture groups; use $ or $0 to represent the entire match. Only matches and capture groups that can be interpreted as numbers will work within formulas. Number parsing is fairly flexible, including recognition of commas, spaces or apostrophes as thousands separators. For numbers that use a comma as the decimal separator, use two dollar signs ($$, $$1, etc.).
Search++ formulas can recognize numbers formatted as times, using colons to separate days, hours, minutes and seconds. The last segment is always seconds, and the value is interpreted as seconds; e.g., 1:23 is the same as 83 and 1:00:00 is interpreted as 3600.
Search++ represents numeric values internally as double precision floating point numbers. Any number up to 9,007,199,254,740,992 without a fraction or decimal, positive or negative, is represented exactly. Most fractions and decimals cannot be represented exactly, but in ordinary use, rounding to a reasonable number of decimal places (so that the total number of digits before and after the decimal is under 15) will make discrepancies irrelevant. Numeric results which exceed 9,007,199,254,740,992 in absolute value are represented in scientific notation.
Wherever a numeric value is used, it is also possible for the value to be Not-a-Number, an indication that something which was expected to produce a number failed to do so. This can happen because you tried to get a number from the document, but the associated text could not be unambiguously interpreted as a number. It can also be the result of an undefined mathematical operation, such as dividing by zero. In most cases, if any of the inputs to an operation or function are Not-a-Number, the result is also Not-a-Number. When the result of a formula is Not-a-Number, Search++ does not insert any text, and no error message is provided.
Two special variables are defined. Use match to substitute a counter that begins at one for the first replacement and increases by one for each additional replacement. (Note that if you are using stepwise replacement, despite the name, the counter only counts replacements, not matches. The counter continues through stepwise replaces, but resets after a Replace All or whenever the replace string is modified.) Use line to represent the line number in the document where the match begins.
Format specifications
You can control how the result of a formula is presented by including a format specification:
(?=format:formula)
before the formula.
| Format specifications for Search regular expression replacement formulas | |
|---|---|
| When a format is not specified, the default is 1.-6 (up to six decimals, suppress trailing zeros, suppress decimal separator if nothing follows, no leading zeros except that a digit is required before the decimal point). | |
| n | One or two digits specify the minimum number of integer digits to be shown (i.e., shorter values will be left-padded with zeros); 0 indicates that a leading zero is not required for decimals. If omitted, the default is 1. |
| t | The letter t specifies that the result of the formula will be shown in time format. The value is interpreted as seconds and displayed as minutes:seconds or hours:minutes:seconds. If n is used it must appear before t; n then applies to the leftmost time segment in each result, regardless of what time unit that represents. |
| . , | A period or a comma indicates that decimal places can be shown, using the specified decimal separator. When a format is specified without a decimal indicator, decimals are rounded and not shown. If a decimal indicator is present but no additional specification follows, the default is .-6 (up to six decimal places, suppress trailing zeros, suppress decimal separator if nothing follows). |
| ,. ., | A comma and a period indicate that a thousands separator should be used: the first mark is the thousands separator and the second mark is the decimal separator. |
| One of the following can follow the decimal or thousands/decimal indicator if it is specified: | |
| d | one or two digits specifying the exact number of decimal places to be shown |
| -d | one or two digits specifying the maximum number of decimal places to be shown, omitting any trailing zeros and decimal separator |
| m-d | Up to d decimal places will be shown, but no fewer than m. If m is 0, all decimal places will be omitted if they are zeros, but the decimal separator will still be shown. |
Syntax of formulas
Formulas are written using most of the common conventions for writing mathematical expressions in typical programming languages: numbers are written with an optional minus sign, digits and an optional decimal point (no commas); +, -, *, /, % and ^ indicate addition, subtraction, multiplication, division, remainder and exponentiation; parentheses are used to indicate order of operations. You can also use logical expressions built from common operators, including = or ==, != or <>, <, <=, >, >=, & and |, in a conditional expression:
| test ? option1 : option2 | yields option1 if test is true, option2 if test is false |
|---|
so $1>10?$2:1 yields the value of the second capture group if the value of the first capture group is greater than 10, and otherwise yields 1.
Formulas can use the many functions built into ExprTk, including these common mathematical functions:
| abs | absolute value |
|---|---|
| avg | average of any number of values |
| ceil | smallest integer greater than or equal to |
| erf | error function |
| erfc | complimentary error function |
| exp | e to the power of the given value |
| floor | largest integer less than or equal to |
| frac | fractional (decimal) part |
| hypot | hypotenuse of a right triangle from two sides (eg: hypot(x,y) = sqrt(x*x + y*y)) |
| log | natural logarithm |
| log10 | base 10 logarithm |
| log2 | base 2 logarithm |
| max | largest of any number of values |
| min | smallest of any number of values |
| ncdf | normal cumulative distribution function |
| round | round to the nearest integer |
| roundn | round the first argument to the number of decimal places specified by the second argument |
| sqrt | square root |
| trunc | integer part (round down) |
and trigonometric functions (in all cases, angles are expressed in radians):
| acos | arc cosine; interval [-1,+1] |
|---|---|
| acosh | inverse hyperbolic cosine |
| asin | arc sine; interval [-1,+1] |
| asinh | inverse hyperbolic sine |
| atan | arc tangent; interval [-1,+1] |
| atan2 | two-argument arc tangent; interval [-pi,+pi] |
| atanh | inverse hyperbolic tangent |
| cos | cosine |
| cosh | hyperbolic cosine |
| cot | cotangent |
| csc | cosecant |
| deg2grad | convert from degrees to gradians |
| deg2rad | convert from degrees to radians |
| grad2deg | convert from gradians to degrees |
| rad2deg | convert from radians to degrees |
| sec | secant |
| sin | sine |
| sinc | sine cardinal |
| sinh | hyperbolic sine |
| tan | tangent |
| tanh | hyperbolic tangent |
ExprTk expressions have many more features which are described in Sections 8, 12, 13 and 20 of the documentation for ExprTk.
Settings
The Settings... item, on the Plugins | Search++ menu and the Tools menu in the search dialog, opens a dialog that allows you to customize various aspects of Search++:
| Search Dialog Layout | |
|---|---|
| Docking | The main Search++ dialog will be a docking dialog. By default it will open on the right side of the Notepad++ window, but you can move it to a different side like any docking dialog in Notepad++. While you can (as with any docking dialog in Notepad++) detatch it from any side and make it floating, it is better to choose one of the other options if you want a dialog that isn’t docked. |
| Horizontal | The search dialog will be a regular (non-docking) dialog with the Find box on the left and the Replace box on the right. |
| Vertical | The search dialog will be a regular dialog with the Find box on the top and the Replace box on the bottom. |
| Adaptive | The search dialog will be a regular dialog; depending on how you size it, the Find box will be above (in a narrow dialog) or to the left of (in a wide dialog) the Replace box. |
| Selections | |
|---|---|
| The first part of this section controls when and if the Find box in the search dialog is filled in automatically with a selection from the active document. Only single selections are considered; columns selections and multiple selections are never used to fill the Find box. | |
| Fill the find box from a single selection in the document when showing the search dialog. | If this box is checked and there is a single selection in the active document when you open the search dialog, the selection will be copied into the Find box — subject to the constraints indicated below, if enabled. |
| Only if the selection has no more than: ___ characters and ___ lines. | If this box is checked, selections are only copied into the Find box if they contain no more than the specified number of characters and also contain no more than the specified number of lines. Use this to avoid filling the search box with text from a selection when you meant to search within the selection. |
| Fill with the word containing the caret if nothing is selected. | If this box is checked when you open the search dialog and there is no selection in the document, the word the caret is within or next to will be used to fill the Find box. |
| Fill after Search... menu command or shortcut even if search dialog is already visible. | Normally the Find box is only filled when you use the Search... command on the Plugins | Search++ menu, or a shortcut you’ve assigned to that command, if the search dialog is not already visible; when the search dialog is visible, the command or its shortcut just switch keyboard focus to the search dialog. If this box is checked, an eligible selection will be used to fill the Find box whenever you use the Search... command or shortcut. |
| The second part of this section controls when and if default search commands (those that don’t specify a scope, such as in Selection or in Whole Document) use a selection as the scope if a non-empty selection exists. | |
| Default commands automatically search within selections. | When this box is checked, commands with default scope will search within the selection (single, column or multiple) if one is present. (However, if the selection is the result of a stepwise Find or Replace command, repeating the same search will not search within the selection regardless of this setting.) |
| Single selections must have at least: ___ characters and ___ lines. | If this box is checked, single selections will not cause the search to be restricted to the selection unless the selection contains at least the specified number of characters and the specified number of lines. Columns selections and multiple selections are not subject to these limitations. |
| Allow default Select command to Select in Selection. | When this box is checked (the default), a Select command with no qualifiers will be treated as Select in Selection if an eligible selection is present, in the same way other default commands are handled. If this box is not checked, default Select commands will never be interpreted as Select in Selection. |
| Convert selections to marked text when beginning a default stepwise search. | Since a stepwise search selects the match it finds, the original selection is lost after the first match when searching within a selection. If this box is checked, whenever a default stepwise search within a selection finds a match, any existing marks in the active document are removed and the text included in the selection is marked, so subsequent searches can search within marked text to preserve the intended scope of the search. |
| When eligible selection and marks are present, default search is within selection. | When this box is checked, if a default command is issued when a selection meeting the criteria in this section is present and marked text is also present, the search will be performed within the selection. When this box is unchecked (the default), marked text takes precedence. You might want to check this box and the box above it (Convert selections to marked text when beginning a default stepwise search) if you frequently use stepwise searches in selections, such as column selections, and you want to be able to change the scope of the search conveniently without needing to manipulate marked text with the Tools menu options. |
| Marked Text | |
|---|---|
| Mark style | When Search++ marks text or searches within marked text, it uses one of the mark styles available in Notepad++. This drop-down lets you choose which one. |
| Default commands automatically search within marked text. | When this box is checked, commands with default scope will search within marked text if any text within the active document is marked. |
| Allow default Mark command to Mark in Marked Text. | When this box is checked, a Mark command with no qualifiers will be treated as Mark in Marked Text if any text in the active document is marked, in the same way other default commands are handled. If this box is not checked (the default), default Mark commands will never be interpreted as Mark in Marked Text. |
| Focus | ||
|---|---|---|
| Focus the document after: | stepwise Find or Replace commands | If this box is checked, when you perform a stepwise find or replace which finds a match, keyboard focus will be placed in the active document, so you can immediately begin typing at or navigating from the match location. If this box is not checked (the default), keyboard focus remains in the search dialog. (You can focus the active document with Ctrl+N.) |
| Select commands | If this box is checked (the default), keyboard focus is placed in the active document after any Select command that finds at least one match. | |
| Show commands | If this box is checked (the default), keyboard focus is placed in the active document after any Show command that finds at least one match. | |
| Focus the search results window after Find All commands. | If this box is checked (the default), keyboard focus is placed at the beginning of the new search results after a successful Find All command. If this box is not checked, keyboard focus remains in the search dialog. (You can focus the search results window with Ctrl+H.) | |
| Clearing | |
|---|---|
| Always clear selections before Select command. (Otherwise add to existing selections.) | When this box is checked (the default), existing selections are de-selected before beginning one of the Select commands. If you want Select commands to add to any existing selection, uncheck this box. If you are selecting within a selection, the original selection will be de-selected regardless of this setting. Adding to existing selections does not always work as you might expect. Rectangular selections are converted to multiple selections. The selections in a multiple selection cannot overlap; when an added selection overlaps an existing selection, the existing selection is replaced rather than extended. (For more predictable behavior, use marked text instead of selections when you want to combine results from multiple searches.) |
| Always unmark all text before Mark command. (Otherwise add to existing marked text.) | When this box is checked, Mark commands remove all marks from the text before beginning the search. If this box is unchecked (the default), marks from successive searches accumulate until you clear them. If you are marking within marked text, existing marks are removed regardless of this setting. |
| Always hide all lines and unmark all text before Show command. | Normally Show commands only hide lines if no lines are hidden, and do not unmark text; this makes different Show commands run in succession effectively “cumulative.” Check this box if you want each Show command to “start over” by hiding all lines and unmarking all text before searching. |
| Unmark all text when closing the search dialog. (Does not apply to docking dialog.) | Check this box if you use one of the regular (non-docking) layouts and you want Search++ to unmark any text in the active document marked in the chosen mark style when you close the dialog. (This isn’t useful or reliable, and hence is not honored, for docking dialogs as docking dialogs “close” when you switch to another tab in the same dock, even though you wouldn’t think of that as closing the dialog.) |
Help/About
Help/About... provides access to release/version identification, this help file, and changelog, license and source information.