allow empty strings in RegExp