Contact

SEARCHB Function (Gnumeric)

Text Beginner Gnumeric Gnumeric 1.9.11

Search UTF-8 byte positions with SEARCHB in Gnumeric. Use case-insensitive wildcard patterns, escaped symbols and carefully scoped starting-byte behavior.

Verification status: Cached October 14, 2026 evidence; no new application run on October 15. 18 selected expressions were recalculated with Gnumeric 1.12.57 ssconvert. Formula identities and raw CSV fields were checked; Gnumeric 1.12.62 was source-checked only; GUI display and native output types were not verified. How formula examples are checked

Quick answer: =SEARCHB("V","Lévy") produced 4 in Gnumeric 1.12.57.

Availability and version history

  • Introduced: Introduced in Gnumeric 1.9.11 release notes.
  • Supported in: Registered in Gnumeric 1.12.62; no retirement is established.
  • Last functioning version: Selected calculations are verified in 1.12.57. The newest functioning release is unverified; source registration in 1.12.62 does not establish newer runtime results.
  • Scope: Desktop Gnumeric with its String Functions plugin. English comma-separated formulas are shown.
  • Checked: October 14, 2026. Tables use 1.12.57 ssconvert under C.UTF-8; 1.12.62 was source-inspected only.

What SEARCHB returns

SEARCHB finds a case-insensitive pattern and returns its one-based byte position in the original UTF-8 string. * matches any sequence, ? matches one character, and ~ escapes a literal wildcard symbol. Versioned function help.

Syntax and arguments

=SEARCHB(pattern,text[,start_byte])
  • pattern: Required search text, optionally containing wildcards.
  • text: Required source string.
  • start_byte: Optional one-based byte position, default 1; it must be within the source byte length.

Brackets indicate optional arguments; do not type them. Current worksheet implementation.

Reproducible examples

The native column records recalculated CSV field content. Quotes delimit readable text; "" means an empty field expected to be text from the callback. They do not certify the exported cell type. The independent column checks the stated character mapping, UTF-8 byte operation or decimal conversion.

Formula Gnumeric 1.12.57 CSV result Independent reference
=SEARCHB("V","Lévy") 4 4
=SEARCHB("É","Lévy") 2 2
=SEARCHB("n","Cancún") 3 3
=SEARCHB("n","Cancún",4) 7 7
=SEARCHB("n*n","Cancún") 3 3
=SEARCHB("?B","A中B") 2 2
=SEARCHB("~*","a*b") 2 2
=SEARCHB("~?","a?b") 2 2

Practical worksheet

=SEARCHB("É","Lévy") returns 2, even though the source uses lowercase é. =SEARCHB("V","Lévy") returns 4. The position counts UTF-8 bytes, while the wildcard question mark matches a character: =SEARCHB("?B","A中B") finds the three-byte 中 followed by B, beginning at byte 2.

Advanced interpretation and checks

The saved =MIDB("Lévy",SEARCHB("É","Lévy"),LENB("é")) extracts é. A search result provides only the start position, not the matched length. In particular, do not use LENB of a wildcard pattern as the length of its actual match.

To find a literal star in a*b, use =SEARCHB("~*","a*b"); the answer is 2. The same escape rule locates the question mark in a?b. In Cancún, the pattern n*n starts at byte 3 but has no match when searching from byte 4.

Boundaries and troubleshooting

A missing match or invalid start gives #VALUE!. The empty-pattern examples return the allowed start within a nonempty source; an empty source or start beyond the last byte fails. F2 contains Lévy.

Starting inside a multibyte character is not a portable technique. The old callback adjusts the byte pointer using the preceding byte; the 1.12.62 callback uses the selected byte directly. Both complete implementations were inspected, but the newer regular-expression behavior at an invalid UTF-8 starting boundary was not executed or inferred. Derive starts from known character boundaries.

Formula Gnumeric 1.12.57 CSV result
=SEARCHB("v","Lévy",2) 4
=SEARCHB("v","Lévy",3) 4
=SEARCHB("é","Lévy",3) #VALUE!
=SEARCHB("n*n","Cancún",4) #VALUE!
=SEARCHB("","Lévy") 1
=SEARCHB("","Lévy",5) 5
=SEARCHB("","Lévy",6) #VALUE!
=SEARCHB("","",1) #VALUE!
=SEARCHB("V",F2) 4

Official evidence and checking scope

The source snapshots and native results below were retained from October 14, 2026. The recovered guide was checked against those saved records on October 15; neither the application nor a newer release was executed again.

The complete SEARCHB callback changes starting-pointer handling and regular-expression cleanup. Newer inside-character search behavior remains unverified. Both stale and uncached SUM controls recalculated correctly. Saved native XML retains the function identities. No GUI result display, other locale, native output-type certification or newer-release execution is claimed.