mod_search_en |
Top Previous |
Description: mod_search is a tool for searching and replacing in text files. In addition to normal searches, regular expressions are also supported. The replacement can be tested in advance. The original encoding of the files is taken into account when replacing. It is also possible to change the encoding of files, for example from UTF-8 to UTF8-BOM or vice versa, without text replacement. When replacing or converting, a backup folder must be specified so that the data can always be restored in the event of an unwanted replacement. Multiple configurations can be saved automatically. There is a preview for the locations found in the file.
Languages: German/English, the language of the user interface is automatically set based on the system language when the program starts.
Systems (only 64Bit): Windows from Windows 10. Download. Linux (Ubuntu-based) from Ubuntu 22.04 TLS. Download.
Installation: The zip file is unpacked into any folder, this can also be the system programs folder. If the folder in which the executable file is located is writable, the current folder is used for the configuration file mod_search.conf, otherwise the system default folder for configurations of the current user. If necessary, the configuration file can also simply be copied; it contains all the settings. Under Windows there is a Desktop Link setting in the dialog, which can be used to create or remove a link on the desktop that can be used to start the program. Note: If dll files are not found after starting Windows, the file vc_redist.x64.exe must be executed.
Planning for future releases: Search in multiple folders. Search and replace on web servers (SFTP). Javascript support. Search and replace in binary files.
Settings: Files: Specifying file filters, several types are separated by a semicolon, example: Example: *.* *.cpp;*.h
Search in: The folder to search in, subfolders can also be searched. Note: Currently only one folder can be searched at a time.
Search text: The search text, which can also be multi-line. If no search text is entered, all files that match the settings under file names will be found. Note: Currently only search and replace in text files is supported, other files are ignored when searching. When searching with search text, replacement or conversion, the Size/Max setting is ignored; the maximum size of the text file must be set under Max. Text Size (MB).
Search type: a) Normal search: Whole word: Only words that are within word boundaries (e.g. space, tab, line break) are found. The setting Underscore is word boundary can be used to determine whether an underscore is also considered a word boundary. Example: When searching for the whole word house, it is not found in lighthouse. When searching for a whole word mod, it will only be found in mod_search if the Underscore is word boundary setting has been activated.
Ignore spaces: Characters such as spaces, tabs and line breaks are ignored when searching both in the search text and in the file content if they occur multiple times; there only needs to be one common occurrence of a space between words within the search text. This setting can slow down the search process. Example: QToolBar *toolBar=new QToolBar(this);m_addNewButton=new QPushButton(toolBar);m_addNewButton->setText("&Add"); finds QToolBar *toolBar = new QToolBar(this); m_addNewButton = new QPushButton(toolBar); m_addNewButton->setText("&Add");
Extended: The text entries \r \n \t in the search text are expanded to carriage return, line feed, tab.
Trim end: Characters such as spaces, tabs, line breaks are removed from the end of the search text.
b) Wildcard: Supported are: ? * [] ! - see Example.
c) Regulärer Ausdruck, Pattern matching, see Info. DME: QRegularExpression::DotMatchesEverythingOption. ML: QRegularExpression::MultilineOption. EPS: QRegularExpression::ExtendedPatternSyntaxOption. IG: QRegularExpression::InvertedGreedinessOption. DC: QRegularExpression::DontCaptureOption. UP: QRegularExpression::UseUnicodePropertiesOption. Capture-Chars: {} [] \\ || In order to possibly insert captures in the replace text, the capture index (starting at 1) must be inserted into one of the following character pairs, which differs from the standard (\i); this does not affect the search word Otherwise, replacement text is entered 'normally' without encoding certain characters.
Example 1, Capture-Chars: {}: Search text: ([a-zA-Z_0-9\.\[\]]+)\.toLower\(\); Replace with: ToLower({1}); Text found: absoluteFilePath = absoluteFilePath.toLower(); Result: absoluteFilePath = ToLower(absoluteFilePath);
Example 2, Capture-Chars: []: Search text: ([a-zA-Z_0-9\.\[\]]+)\.trimLeft\((.+)\); Replace with: TRIM_LEFT([1], [2]); Text found: absoluteFilePath = absoluteFilePath.trimLeft(2); Result: absoluteFilePath = TRIM_LEFT(absoluteFilePath, 2);
Size (Bytes, kB, MB, GB): A minimum and/or maximum size can be specified. The value 0 corresponds to no information. This filter only applies to a general search without searching for content. Note: When searching with search text, replacement or conversion, this setting is ignored; the maximum size of the text file must be set under Max. Text Size (MB).
Date from, to: A date range can be entered for the file modification date; the date values 1/1/1970 and 12/31/3000 do not correspond to any entries.
Replace with: The text with which the search text should be replaced can also be multi-line. With regular expressions, this is entered 'normally' without encoding certain characters.
Empty input is valid: If no replacement text is entered, the search text is removed from the file content.
Advanced: See above.
Conversion: Changes the text encoding for a file. Important: If an entry other than None conversion was selected, the file will also be changed if no text search was set. In this case, a change only takes place if the original and new text content of the file differ. If a text search is also set, the conversion will only be carried out if the search text is found.
Backup folder: If a replacement or a change to the text encoding is to take place, a backup folder must be specified beforehand; this must not be a subfolder of the search folder (Search in). The original file is only changed after a copy of the original file has been successfully stored in the backup folder. With each new replacement process, a subfolder with date and time information is created in the backup folder (e.g. 02/07/2023-08/11/03), in which the same subfolders as in the search folder are created for the copies of the original file. If an unwanted replacement occurs, the previous status can be reversed at any time by copying the folder to the search folder.
Search: Starts the search.
Replace: Starts the replacement/conversion.
Calculate hits: Calculates the number of all text passages found in a file. If there are many occurrences, this can slow down the search process.
Settings: You can use the New button to create a new configuration for the current settings.
Deskop Link: See Installation.
Check search results, test replacement: If a search text has been specified, when you click on an entry in the hit list, an additional text window appears in which you can navigate through all hits. The window can be deactivated using the Hide source text setting. The Test Replace button creates a temporary file in which the locations found have been replaced. If there is a system shortcut with the ending .csv (usually notepad under Windows), the text editor will then be opened with the text.
|