Why does SEARCH with regular expression (regex) fail with #VALUE!

I just don’t get it /:

I’m trying a very very simple SEARCH (formula) for numbers:

=SEARCH(A1;"[0-9]")

and it fails, no matter if the A1 is empty, contains text, or numbers.

It gives me #VALUE! as an error.

Why is that?

Enable regular expressions option is activated.

Because

  1. it should be =SEARCH("[0-9]";A1) i.e. the arguments swapped
  2. Tools→Options→Calc → Enable regular expressions in formulas must be active

If you would read the HELP for SEARCH, you maybe would realize that’s the search-expression should be the first argument…not the second

You don’t need to be offensive, man – don’t you think I googled and read several help pages? It’s an easy to miss detail.

1 Like

Wrong order.