Navigation: TextEd > Introduction > Tutorials and misc functions >

Find and replace (search)

 

 

 

Search can be executed using a modal search window, or a search-bar located at the bottom of the main window. You can chose which one you prefer in options.
 

Modal search window


The modal search window has four tabs.
 


 

Find/Replace

Use these tabs to find or replace a text string inside an open file.

 


Find in Files

Find or replace a text string in all open files, project files or folder(s). It's possible to select multiple folders to search through.

 


Goto

Goto a function or procedure in your code, a line or a bookmark.

 


Search-bar


The search bar is located at the bottom of the main window.

 


 

The search bar has the same function as the modal window, except for the goto tab.
 

Options


Most options are fairly standard and found in most editors, but there may be some that need an explanation.

 

 

Preserve Case

Use this options to replace text in your document and preserve the casing of the replaced text.


Ex.

          Find                              : "member_name"

          Replace with                    : "auth_fullname"
 

Result

          member_name                    => auth_fullname

          Member_Name                    => Auth_Fullname

          MEMBER_NAME          => AUTH_FULLNAME
 

As you can see above - member_name is replaced by auth_name, while MEMBER_NAME  is replaced by AUTH_FULLNAME. The case of the text is preserved even when replaced.


 

Skip strings

Text inside strings are ignored.


 

Skip comments

Text in line comments and comment blocks are ignored.


 

Skip tags

Code inside tags are ignored. This option can be useful in HTML or XML code if you only want to search text between the tags and not inside the tags them selfs.


 

Regular expressions

For more info on regular expressions go to https://www.regular-expressions.info
 

It is possible to use some replace variables like $0 .. $3, $Count, $DateTime, $Date and $Time.
 

$0 can be used to capture the found expression and $1 .. $3 to capture groups.
 

Ex.

Find                    : (\d{3,4})[- ]?(\d{4})[- ]?(\d{4})[- ]?(\d{4})

Replace          : $1 xxxx xxxx xxxx

 

Text                    : Your credit card number is 123 4567 8912 3456

 

After replace          : Your credit card number is 123 xxxx xxxx xxxx

 

Date and time variables can be used to insert the current date and time.
 

Output options


List all items found/replaced


A list of all found or replaced items are displayed in the search result panel. Click on an item using the mouse to open the file and place the text cursor at the highlighted position.


Show preview window

Use the preview window to see what will be replaced using the current search strings. You are able to select the actions you want to execute or cancel the replace.

This is only used with "Replace All".

 

 




 

 

 

 

Copyright © 2022 Rickard Johansson