Find & Replace — Full‑Text Searches and Replacing

1. Overview

To perform full‑text searching, use Edit > Find (F3). Enter the search text in the Find field of the Find & Replace toolbar. Click Options to choose whether the search text is treated as a regular expression or as plain text.

Selecting a range limits searching and replacing to that range. Clicking any cell cancels the active range and searching resumes across the entire worksheet. Changing search/replace options or text strings starts a new search.

2. What Is Searched

3. Search Modes

3.1 Regular Expressions

The Find string is interpreted as a regular expression. Examples:

abcCells containing “abc”
.bcAny character followed by “bc”
\AabcStarts with “abc”
abc\zEnds with “abc”
\Aabc.*123\zStarts with “abc”, ends with “123”
abc\d\zEnds with “abc” + digit
^a\d+Line starting with “a” + digits
^a\d*Line starting with “a” + optional digits
a\d*$Line ending with “a” + optional digits
[ab]+c“abc”, “aabc”, “abbabc”… but not “c” alone
[ab]*cSame as above, including “c”
[^ab]+cEnds with “c”, contains no “a” or “b”
\w\d{2,3}Letter + 2–3 digits
^ab\d{2,3}cStarts with “ab”, 2–3 digits, “c”
abc|xyzContains “abc” or “xyz”
(?=.*abc)(?=.*xyz)Contains both “abc” and “xyz”
\A\zEmpty cells

Additional options:

Empty matches occur for patterns like a? or \A\z, allowing searches for empty cells within data blocks.

See PCRE regular expression syntax summary.

Replace String Features

Notes:

The “RegEx” menu in GS‑Base inserts regex tags easily.

*

4. Examples

Find:cat
Replace:dog
Result:Replaces “cat” with “dog”
Find:\\
Replace:/
Result:Replaces “\” with “/”
Find:\A\z
Replace:NULL
Result:Fills empty fields with “NULL”
Find:\ANULL\z
Replace:
Result:Deletes fields containing only “NULL”
Find:\b(\w+)(?:\W+\1\b)+
Replace:\1
Result:Removes duplicate words
Find:(\b\w)(\w*(\W+|\z))
Replace:\u\1\l\2
Result:Capitalizes first letters
Find:(\b\w)(\w*(\W+|\z))
Replace:\1
Result:Creates abbreviations
Find:(\b\w(\d*))(\w*(\W+|\z))
Replace:\1
Result:Abbreviations; numbers preserved
Find:\b((\d{1,3}\.){3})\d{1,3}\b
Replace:\1*
Result:Masks IP addresses
Find:(\S*)(\s*)(\S*)(\s*)(\S*)
Replace:\g5\g4\g3\g2\g1
Result:Reverses first three words
Find:\R
Replace:\s
Result:Replaces line breaks with spaces
Find:ab+
Database field content:abcdefaabb
Replace:x
Result:xcdefax
Find:(.)a+\d{1,3}
Database field content:abc aa0102
Replace:\1
Result:abc 2
Find:(ab)
Database field content:abcdef ghijk abb123
Replace:\u\1\l\1xyz\s
Result:ABabxyz cdef ghijk ABabxyz b123
Find:\R
Database field content:abc
def
ghi
Replace:\s
Result:abc def ghi

3.2 Plain Text — Partial Matching

Searches for substrings. Supports wildcards ? (any character) and * (any string). Literal “?” or “*” must be prefixed with ~.

3.3 Plain Text — Full Content Matching

Matches the entire cell contents. Same wildcard rules as above.

3.4 Scripts

The Scripts button performs quick mass text replacements in a table.

Note:

The “search” and “replace” strings must follow CSV quoting rules:

*