var regex = "<a\b[^>]*>(.*?<span\b[^>]*>(.*?)<\/span>)<\/a>";
<a href="/computers">Computers<span>(1896)</span></a>
How to get only "Computers" text ?
var regex = "<a\b[^>]*>(.*?<span\b[^>]*>(.*?)<\/span>)<\/a>";
<a href="/computers">Computers<span>(1896)</span></a>
How to get only "Computers" text ?
You have a ")" in the wrong place:
<a\b[^>]*>(.*?)<span\b[^>]*>(.*?)<\/span><\/a>
FYI: Google and find a favorite REGEXP tester. There are some available in Visual Studio extensions and additionally some on the internet plus some in other tools like Komodo, etc.
I tossed your string and expression into https://regex101.com/ and had it working in less than a minute.