Stripping a number at the end of a text

In column G I have a list of names.
Some of the names have a number at the end & some don’t.
To remove the number at the end of the name I use:

=REPLACE(A2,SEARCH("[0-9]",A2,2),LEN(A2)-SEARCH("[0-9]",A2,2)," ")

This works fine with the names with numbers at the end but as soon as I get a name without a number I get an error

Libre office version

The problem is SEARCH() returns an error if find nothing.
Capturing the error like in next formula must solve the issue:

Alternate regex (no need for offset correction): =LEFT(A1;SEARCH("[A-Z][0-9]*$";A1;1))

Thanks mariosv

The formula you have given me worked perfectly this morning but when I tried to open my calc doc just now it is hanging.
I should have said my os is opensuse 13.1

The problem seems to be opensuse.
I see other people have the same problem as soon as they try to do a web query.