How about just `pages.replace(/\s*(?:Artikel|Article)\s*\//, '').trim();`