core: Fix incorrect regexp

Fixes #1200