=FormulaProof
1

Finding ·

We deleted one backslash from twelve formulas. Sheets complained about two.

2

Somebody sends you a formula. It is in an email, or a support article, or a message from the colleague who is good at this sort of thing. You copy it, you paste it into the cell, you press enter.

It works.

That is the whole problem, and it is the reason this page exists.

What we did

We took twelve formulas that a person doing a weekly report would plausibly write. Extract the order number. Check that a cell holds a whole number. Collapse the double space somebody left in a name. Reformat an ISO date into the one your manager reads.

Then we removed exactly one backslash from each — or two, where the formula had two — and ran every version in a real Google Sheet. Not a simulator. Not a regex playground. A spreadsheet, the same one you would open.

We were expecting a column of red errors. Google Sheets produced two.

The other ten formulas ran, returned a value, and displayed it in black text with no triangle, no tooltip, and no indication of any kind that the answer was wrong.

The one that should frighten you

Here is the formula, intact:

=REGEXEXTRACT("Order 4821", "\d+")

It returns 4821. \d means a digit, + means one or more of them, and there is only one run of digits in the cell.

Now delete the backslash, which is what happens when the formula travels through a text field that treats \ as an escape character and quietly consumes it:

=REGEXEXTRACT("Order 4821", "d+")

Without its backslash, d no longer means a digit. It means the letter d. And the word Order contains the letter d.

So the formula finds something. It returns:

d

Not an error. Not a blank. The letter d, sitting in the cell where the order number should be, in a column of four-digit numbers, in a report that goes out on Friday.

The reason Sheets says nothing is that nothing went wrong. The pattern was valid. It was applied. It matched. Every layer of the system did its job correctly, and the layer that knew what you meant — you, three days ago, reading a web page — is not part of the system.

Ten silent failures, sorted by how they lie

Of the twelve damaged formulas, ten returned a value. They did not all lie the same way, and the differences matter, because each kind hides in a different place.

It returns a plausible-looking value. The d above. This is the rarest and the worst: bad data that enters your spreadsheet as data. If the cell had held Invoice 4821 instead of Order 4821 there would have been no d to find, and you would have got an honest #N/A. Whether your report breaks loudly or silently depends on a letter in a word you were not looking at.

It returns FALSE when the answer is TRUE. Seven of the ten. =REGEXMATCH("4821","^\d+$") asks is this cell a whole number? and answers TRUE. Strip the backslash and ^d+$ asks whether the cell is the letter d repeated, so it answers FALSE. Nothing has failed. A validation column has simply started rejecting everything, and a filter built on it now shows an empty table that looks exactly like a filter with nothing to show.

It does nothing at all. =REGEXREPLACE("Jane Doe","\s+"," ") collapses the double space. Without the backslash, s+ looks for the letter s, does not find it, and REGEXREPLACE returns the string it was given. The cell still reads Jane Doe. An unrun cleanup is indistinguishable from a cleanup that had nothing to clean.

The date case is the same failure wearing better clothes. This reformats an ISO date:

=REGEXREPLACE("2026-07-09", "(\d{4})-(\d{2})-(\d{2})", "$3/$2/$1")

09/07/2026. Strip the three backslashes and the pattern matches nothing, so the function hands back its input: 2026-07-09. Still a date. Still the right date. A column of these does not look broken. It looks like a column you have not converted yet.

The two that did complain, and why they were the lucky ones

Only two of the twelve produced anything a person would notice.

=REGEXMATCH("margin 50%)", "\)$")     →  TRUE
=REGEXMATCH("margin 50%)", ")$")      →  #REF!

The escaped \) means a literal closing bracket. Unescaped, ) closes a group that was never opened, and RE2 — the engine Google Sheets uses — refuses the pattern outright. Sheets renders that refusal as #REF!, which is the same error you get from a deleted cell reference, but at least it is an error.

The other loud one turns a currency symbol into an anchor:

=REGEXEXTRACT("Total: $1,240.00", "\$[\d,]+\.\d{2}")   →  $1,240.00
=REGEXEXTRACT("Total: $1,240.00", "$[d,]+.d{2}")       →  #N/A

\$ is a dollar sign. Bare $ means end of string, so the pattern now demands several characters after the end of the text, which no text has. #N/A.

Both of these are formulas whose damaged version happened to be either unparseable or unmatchable. That is luck, not design. Nothing in Sheets checks whether your pattern means what you meant.

Escaping too much fails the same way, quietly

The opposite corruption exists. Some editors and message boxes double a backslash rather than eat it, and \d arrives as \\d:

=REGEXMATCH("Order 4821", "\\d+")     →  FALSE

\\ is a literal backslash. The pattern now hunts for a backslash followed by one or more ds, which the cell does not contain, so the answer is FALSE. No error. The same silence, from the opposite mistake.

Why the examples in tutorials always work

We ran one more formula as a control:

=REGEXMATCH("URGENT: ship today", "^URGENT")   →  TRUE

No backslash. Nothing to lose. It survives any copy, any paste, any chat client, any CMS.

This is why the first example on every regex page works when you try it, and why the trouble starts on the third one. The patterns that break in transit are the patterns that do real work — dates, digits, currency, whitespace, word boundaries. All of them are backslashes.

What to do about it

Type the backslash yourself. After pasting any pattern, look at it in the formula bar and count. \d, \s, \., \b, \(, \$. If a pattern has none, and it is doing something more specific than matching a literal word, it has probably been damaged.

Test the failure, not the success. A formula that returns something is not a formula that works. Feed it one row you know should match and one row you know should not. If both answer the same way, the pattern is not doing what you think, whatever the cell says.

Do not wrap it in IFERROR yet. IFERROR would have hidden both of the two errors we found — the only two warnings Sheets was prepared to give. It turns your last honest signal into a blank cell. We measured that separately, and it has its own page.

You can paste a pattern into our tester, which flags the constructs Sheets cannot run and, separately, the ones that will run and return the wrong answer. That second list is short and it is the one that costs people their Friday.

Every formula quoted above was executed in a live Google Sheet before this was published, and the values you see are the values it returned. The full run, with timestamps, is on the evidence page.

3

The run

Nothing above was typed from memory. Here is every formula, and the value Google returned.

Execution log

One backslash goes missing between the web page and the cell

Ran
Engine
Google Sheets (live, via Sheets API v4)
Locale
en_US
Host
Windows_NT 10.0.26200 · Node v24.15.0
Result
22 of 22 as expected
Cell Formula What Google returned
B1 =REGEXEXTRACT("Order 4821","\d+")

intact: pull the number out of an order line

4821
B2 =REGEXEXTRACT("Order 4821","d+")

one backslash gone: the same formula, still green

'Order' contains a d. There is something for the pattern to find, so there is nothing for Sheets to complain about.

d
B3 =REGEXMATCH("4821","^\d+$")

intact: is this cell a whole number?

TRUE
B4 =REGEXMATCH("4821","^d+$")

one backslash gone: is this cell a whole number?

FALSE
B5 =REGEXREPLACE("Jane Doe","\s+"," ")

intact: collapse repeated spaces

Jane Doe
B6 =REGEXREPLACE("Jane Doe","s+"," ")

one backslash gone: collapse repeated spaces

REGEXREPLACE returns the original string when nothing matches. A function that does nothing is indistinguishable from a function that had nothing to do.

Jane Doe
B7 =REGEXMATCH("12.50","^\d+\.\d{2}$")

intact: does this look like money?

TRUE
B8 =REGEXMATCH("12.50","^d+.d{2}$")

both backslashes gone: does this look like money?

FALSE
B9 =REGEXMATCH("12.50","^d+\.d{2}$")

only the escape on the dot survives

Backslashes do not vanish as a set. Whichever one a text pipeline eats is the one that decides the answer.

FALSE
B10 =REGEXMATCH("(draft)","^\(draft\)$")

intact: is this row marked as a draft?

TRUE
B11 =REGEXMATCH("(draft)","^(draft)$")

both backslashes gone: the parentheses become a capture group

Still a valid pattern. It now asks whether the cell is the word draft, which it is not.

FALSE
B12 =REGEXMATCH("margin 50%)","\)$")

intact: does the line end in a closing bracket?

TRUE
B13 =REGEXMATCH("margin 50%)",")$")

one backslash gone: an unmatched bracket

This is the case we expect to fail loudly, and the reason the others are dangerous.

#REF!
B14 =REGEXEXTRACT("Total: $1,240.00","\$[\d,]+\.\d{2}")

intact: extract a formatted total

$1,240.00
B15 =REGEXEXTRACT("Total: $1,240.00","$[d,]+.d{2}")

every backslash gone: the dollar sign becomes an anchor

#N/A
B16 =REGEXREPLACE("2026-07-09","(\d{4})-(\d{2})-(\d{2})","$3/$2/$1")

intact: reformat an ISO date as day/month/year

09/07/2026
B17 =REGEXREPLACE("2026-07-09","(d{4})-(d{2})-(d{2})","$3/$2/$1")

every backslash gone: the date comes back unreformatted

The output is still a date. It is still the date in the cell. A column of these looks like a column that has not been converted yet, not like a column that is broken.

2026-07-09
B18 =REGEXMATCH("the cat sat","\bcat\b")

intact: whole-word match

TRUE
B19 =REGEXMATCH("the cat sat","bcatb")

both backslashes gone: whole-word match

FALSE
B20 =REGEXMATCH("Order 4821","\\d+")

the other direction: a pipeline that escapes instead of eating

Some editors double a backslash rather than remove it. The pattern now looks for a literal backslash followed by a d.

FALSE
B21 =REGEXMATCH("3.14","3\\.14")

a doubled backslash before a dot

FALSE
B22 =REGEXMATCH("URGENT: ship today","^URGENT")

the control: a pattern with no backslash at all is unharmed

Patterns that survive the trip are the ones that never needed a backslash. This is why simple examples in tutorials appear to work.

TRUE

Every row above was written into a real Google Sheet and read back through the Sheets API on 2026-07-10. The case file and this log are in the repository, and the build refuses to run if they disagree.

4