Home
Power Search and Replace Tool Prev Page Prev Page
Introducing PowerGREP
Getting Started with PowerGREP
Regular Expression Quick Start
PowerGREP Contact Information
How to Use PowerGREP
Mark Files for Searching
Define a Search Action
Interpret Search Results
Edit Files and Replace or Revert Individual Matches
Keyboard Shortcuts
PowerGREP Examples
Search Through File Names
Find Email Addresses
Find Word Pairs
Boolean Operators “and” and “or”
Find Two Words Near Each Other
Find Two or More Words on The Same Line
Extract or Delete Lines Matching One or More Search Terms
Delete Repeated Words
Add a Header and Footer to Files
Update Copyright Years
Add Proper HTML <TITLE> Tags
Replace HTML Tags
Replace HTML Attributes
Search Through or Skip Source Code Comments and Strings
Convert Windows to UNIX Paths
Extract Data into a CSV File or Spreadsheet
Collect a List of Header and Item Pairs
Inspect Web Logs
Extract Google Search Terms from Web Logs
Compile Indices of Files
Make Sections and Their Contents Consistent
Generate a PHP Navigation Bar
Include a PHP Navigation Bar
PowerGREP Reference
PowerGREP Assistant
File Selector Reference
File Selector Menu
Action Reference
Search Terms and Options
Action Definition
Extra Processing
File Sectioning
Target and Backup Files
Action Menu
Library Reference
Library Menu
Results Reference
Results Menu
Editor Reference
Editor Menu
Undo History Reference
Undo History Menu
Change PowerGREP’s Appearance
Preferences
Path Placeholders
Supported File Formats
Command Line Parameters
XML Format of PowerGREP Files
Regular Expression Tutorial
Introduction
Tutorial Contents
Characters
How a Regex Engine Works Internally
Character Classes
Dot (Any Character)
Start and End of String or Line
Word boundaries
Alternation
Making a Token Optional
Quantifiers (Repetition)
Grouping and Backreferences
Named Capturing Groups
Unicode
Mode Modifiers
Atomic Grouping and Possessive Quantifiers
Lookahead and Lookbehind
Test The Same Part of The String for More Than Once
Continuing from The Previous Match
If-Then-Else Conditionals
Adding Comments
Regular Expression Reference
Basic Syntax
Advanced Syntax
Flavor-Specific Syntax
Unicode Syntax
Regular Expression Examples
Regular Expression Examples
Floating Point Numbers
Dates
Matching Complete Lines
Delete Duplicate Lines
Programming Language Syntax
Two Near Words
Regex Tools and Languages
Overview
grep
RegexBuddy
EditPad Pro
Delphi
Java
Java Example
JavaScript
JavaScript Example
.NET (C# and VB.NET)
C# Example
PCRE
Perl
PHP
Python
Ruby
Regular Expression Books
Teach Yourself...in 10 Minutes
Mastering Regular Expressions
Java Regular Expressions
Regular Expression Recipies

Editor Reference

PowerGREP sports a full-featured built-in file editor for editing both text files and binary files. PowerGREP's editor is built on the same technology as EditPad, a popular text editor designed by Jan Goyvaerts and sold under the JGsoft brand name, just like PowerGREP.

The key advantage of PowerGREP's built-in editor is that it highlights search matches with you preview or execute an action (but not when you use Quick Execute). If you've previewed a search-and-replace action, you can replace individual matches in the editor with just one click. If you executed the search-and-replace, you can revert individual replacements to the original text with just one click. Replacing and reverting individual matches is much more comfortable than answering yes/no for each replacement while the action is executed, as most other grep tools do. The editor supports unlimited undo and redo, so mistakes are easy to fix. The highlighting is automatically updated to reflect replaced matches and reverted replacements.

Cursor Movement Keys

Arrow keyMoves the text cursor (blinking vertical bar).
Ctrl+Left arrow [text]Moves the text cursor to the start of the previous word or the end of the previous line, whichever is closer.
Ctrl+Right arrow [text]Moves the text cursor to the start of the next line or the end of the current line, whichever is closer.
Ctrl+Up/Down arrowScrolls the text one line up or down.
Page up/downMoves the text cursor up or down an entire screen.
Ctrl+Page up/downScrolls the text one screen up or down.
HomeMoves the text cursor to the beginning of the line.
Ctrl+HomeMoves the text cursor to the start of the entire text.
EndMoves the text cursor to the end of the line.
Ctrl+EndMoves the text cursor to the end of the entire text.
Shift+Movement keyMoves the text cursor and expand or shrink the selection towards the new text cursor position. If there was no selection, one is started. Pressing Ctrl as well, will move the text cursor correspondingly.
Alt+Shift+Movement [text]The same as when Alt is not pressed, except that if word wrap is off, the selection will be rectangular instead of flowing along with the text.

Editing Commands

EnterInserts a line break.
Shift+EnterInserts a line break.
Ctrl+EnterInserts a page break.
DeleteDeletes the current selection if there is one and selections are not persistent. Otherwise, the character to the right of the caret is deleted.
Ctrl+DeleteDeletes the current selection if there is one. Otherwise, the part of the current word to the right of the text cursor is deleted [text].
Deletes the current selection [hex].
Shift+Ctrl+DeleteAll the text on the current line to the right of the text cursor is deleted [text].
Deletes the current selection [hex].
BackspaceDeletes the current selection if there is one and selections are not persistent. Otherwise, the character to the left of the caret is deleted.
Ctrl+BackspaceDeletes the current selection if there is one and selections are not persistent. Otherwise, the part of the current word to the left of the text cursor is deleted [text].
Deletes the current selection [hex].
Shift+Ctrl+BackspaceDeletes the current selection if there is one and selections are not persistent. Otherwise, all the text on the current line to the left of the text cursor is deleted [text].
Deletes the current selection [hex].
Ctrl+ZUndo the last edit
Ctrl+RRedo the last undone edit
Alt+BackspaceAlternative shortcut for Undo
Alt+Shift+BackspaceAlternative shortcut for Redo
InsertToggles between insert and overwrite mode.
Tab [text]If there is a selection, the entire selection is indented. Otherwise, a tab is inserted.
Tab [hex]Makes the text cursor switch between the hexadecimal side and text side.
Shift+Tab [text]If there is a selection, the entire selection is unindented (outdented). Otherwise, if there is a tab, or a series of spaces the size of a tab, to the left of the text cursor, that tab or spaces are deleted.
Ctrl+ASelect all
Ctrl+YDelete the current line
Shift+Ctrl+YDuplicate the current line

Clipboard Commands

Ctrl+XCut: Delete the selected text and put it on the clipboard.
Shift+Ctrl+XCut Append: Delete the selected text, and append it to the text already on the clipboard.
Ctrl+CCopy: Put the selected text on the clipboard, replacing any data help by the clipboard.
Shift+Ctrl+CCopy Append: Append the selected text to the text already on the clipboard.
Ctrl+VPaste: Insert the text held by the clipboard.
Shift+Ctrl+VSwap with Clipboard: Replace the text on the clipboard with the selected text, and vice versa.
Shift+DeleteAlternative shortcut for Cut
Ctrl+InsertAlternative shortcut for Copy
Shift+InsertAlternative shortcut for Paste

Mouse Actions

Dragging means to move the mouse before releasing the mouse button you pressed. If you move the mouse pointer to the edge of the editor space while dragging, the text will start to scroll automatically. Modifier keys like shift or control must be pressed before pressing the mouse button and kept depressed until the mouse button is released.

Left clickMoves the text cursor to the spot where you clicked.
Shift+Left clickMoves the text cursor and expands or shrinks the selection. If there is no selection, the text between the old and new cursor positions becomes selected. If you click outside of the selection, the selection plus the text between the selection and the new cursor position becomes selected. If you click inside the selection, the new selection is the text between the original start of the selection and the new cursor position.
Left click+dragWhen clicking outside the selection, a new selection is created from the point where you press the mouse button until the point where you release it.
When clicking inside the selection, the selected text deleted and inserted again at the spot (outside the selection) where you release the mouse button.
Shift+Left click+dragExpands or shrinks the selection like Shift+Left click, but then the text cursor is moved and the selection adjusted until you release the mouse button.

If you press Alt while changing the selection with the mouse, and word wrap is off, the selection becomes rectangular.

Rotate wheelScrolls the text a single line up or down.
Shift+WheelMoves the text cursor a line up or down, like pressing the up or down arrow keys on the keyboard.
Ctrl+WheelScrolls the text an entire screen up or down.
Shift+Ctrl+WheelMoves the text cursor a screen up or down, like pressing page up or down on the keyboard.

 

Visit the best online web design and script resources