Added pcre options and moved search over to regex functions