Anchors ^ and $
Anchors match at the beginning of a file, a line, or a word. All of them are “zero-width”, that is, they don't match any characters in the source file.
^^ or \A |
The beginning of a file |
$$ or \Z |
The end of a file |
^ |
The beginning of a line |
$ |
The end of a line |
\< |
The beginning of a word |
\> |
The end of a word |
\b |
Word boundary (beginning or end) |
\B |
Not word boundary (between two letters or two spaces) |
For example:
^From |
A line starting with “From” |
ing\> |
A word ending with “ing” |
ing\b |
The same thing |
^abc$ |
A line containing only “abc” |
^#include |
A line starting with “#include” |
^$ |
An empty line |
^^$$ |
An empty file |
This is a page from Aba Search and Replace help file.
- Welcome to Aba
- Getting started
- How-to guides
- Selecting the files to search in
- Inserting some text at the beginning of each file
- Replacing multiple lines of text
- Searching in Unicode files
- Replacing in binary files
- Performing operations with the found files
- Undoing a replacement
- Saving search parameters for further use
- Removing private data
- Adding or removing Aba from Explorer context menu
- Integrating Aba with Total Commander
- Integrating Aba with Free Commander
- Integrating Aba with Directory Opus
- Regular Expressions
- Replacement syntax
- User interface
- Command line
- Troubleshooting
- Glossary
- Version history
- Credits