Fix unsupported regexp parameter in assemble

See #6383 for details.