Fixed issue with spaces in regexp

... Reopened is_regexp improvements...