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 capabilites 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. The bottom section of the context menu lets you select from a history of the last ten strings you have used for searches.
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.
You can change the size of text in the Find and Replace boxes by zooming (Ctrl with the mouse wheel, Ctrl with the plus and minus keys on the numeric keypad, or the Zoom commands from the context menu).
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.
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).
- 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 unhides all lines in the active document.
- Selections 🡪 Marked Text marks all text that is currently selected in the active document. (By default, Search++ uses the “Find Mark Style” marker, the same one used by the Mark tab of the Search dialog in Notepad++. You can change the marker in the Search++ settings.)
- Marked Text 🡪 Selections selects all text that is currently marked in the active document.
- Unmark All Text removes the marker Search++ is using from all text in the active document.
- 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, you can use Ctrl+O (Other) to switch between the Find box and the Replace box. (If neither is in focus, focus goes to the Find box.) Ctrl+N returns focus to the active document in the main Notepad++ window; Ctrl+Shift+N closes the search dialog and returns focus to Notepad++. If there are search results, Ctrl+H places keyboard focus in the Search results window.
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 direction and the scope.
Search actions
Search actions define what sort of thing a command will do. The possible search actions are Find, Count, Find All, Mark, Select, Show, Replace and Find, Find or Replace and Replace All:
- Find finds one occurrence of the search string. The default direction for find commands is forward, starting from the current position or selected text. For plain text searches, Find can also have the Backward direction.
- Count shows a message at the bottom of the search dialog telling how many occurrences of the search string can be found.
- Find All searches for occurrences of the find string and lists them in the Search results window.
- Mark searches for occurrences of the find string and marks the found text. By default, marks already in the document are not cleared first; you can change this behavior, and choose which marker is used, in the Settings dialog.
- 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 (including rectangular and multiple selections) is cleared before the search begins; you can change this behavior in the Settings dialog.
- 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 and Find first finds a match, then on subsequent clicks replaces the match and finds the next match.
- Find or Replace first finds a match, then the next click replaces the found match, leaving the replacement location visible. The next click finds, the next click replaces, and so on.
- Replace All searches for occurrences of the find string and replaces them with the replace string.
Search directions
Search directions describe the direction of motion through the document. Command actions which take a single step at a time (Find, Replace and Find and Find or Replace) can search Forward (the default) or (for Plain text searches) Backward. All the other command actions, which search for multiple occurrences at one time, can search Everywhere (the default), Before or After:
- Forward is the default for Find, Replace and Find and Find or Replace actions. It means moving 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 Find, Replace and Find and Find or Replace actions only when searching for Plain text. It means moving 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).
- Everywhere is the default direction for command actions that search for multiple occurrences at one time. It just means that the entire scope (selected text, marked text or the whole document) is searched.
- Before applies the command action only to matches that occur earlier in the active document that the current position or selection. The action is not applied to matches which overlap the current position or selection.
- After applies the command action only to matches that occur later in the active document that the current position or selection. The action is not applied to matches which overlap the current position or selection.
Search scopes
Search scopes determine what will be searched: Selection, Marked Text or Whole Document. The default is a “smart scope” which determines the effective scope based on whether there is already a selection or marked text in the document:
- Whole Document means selections and marks are ignored; everything in the document (subject to any direction constraint) is searched.
- Selection: If there is a non-empty selection — single, rectangular or multiple — the search will be confined to the selected text. Note that 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 $). If there is no selection, then the search will encompass the entire document.
- Marked Text: If there is any marked text, only marked text will be searched; if the document contains no marked text, the whole document will be searched. The considerations above concerning selections apply to marked text as well: regular expressions treat each span of marked text independently from other spans and from the surrounding unmarked text.
- Default (“smart”) scope attempts to infer what you probably want to search based on whether anything is already marked or selected. The default rules are these:
- Marked text takes precedence. If any text is marked, then the search is confined to marked text.
- Otherwise, if there is a multiple selection or a rectangular selection, the selection is searched.
- Otherwise, if there is a single selection encompassing at least 80 characters and three lines, it will be searched.
- Otherwise, the whole document is searched.
Search results window
The Find All command (and its variants, Find All Before, Find All in Marked Text, etc.) lists the matches it finds in the Search++ Results window. This is a docking dialog 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. 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 another header line giving the file name searched 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 open 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.
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+O to open the search dialog, if it is not already open, and focus the Find box. Ctrl+N returns focus to the active document in the main Notepad++ window; Ctrl+Shift+N closes the search results window and returns focus to Notepad++.
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.) 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 | |
|---|---|
| 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 (not a column selection or a multiple 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. |
| Automatically search within selections. | When this box is checked, commands with default (“smart”) 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. |
| Convert selections to marked text before beginning a 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 stepwise search command begins a search within a selection, the text included in the selection is marked, so subsequent searches can search within marked text to preserve the intended scope of the search. |
| 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. |
| Automatically search within marked text. | When this box is checked, commands with default (“smart”) scope will search within marked text if any text within the active document is marked. |
| 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.) |
| Focus | |
|---|---|
| Focus the document after a stepwise find or replace. | 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, keyboard focus remains in the search dialog. You can focus the active document with Ctrl+N.) |
| Focus the search results window after commands that use it. | If this box is checked, successful commands which add lines to the search results window (currently only Find All commands) will place keyboard focus at the beginning of the new search results. (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. |
| 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 “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. |
Help/About
Help/About... provides access to release/version identification, this help file, and changelog, license and source information.