I'm looking to strip out some contents from the page <title>
on click with JavaScript.
Before: (1) Hello World
(value in brackets can change)
After: Hello World
What would be the best document.title.replace()
regex to capture this (1)
part (with a space after it)?
So this matches a string starting with a
(
, then one or more of a digit, then)
and finally a space. This will match(1)
or even(556)
.