Merge branch 'dev-v8' into dev-v8-ExamineV2

Conflicts:
	src/Umbraco.Tests/UmbracoExamine/IndexInitializer.cs
	src/UmbracoExamine/DataServices/PropertyAliasDto.cs
	src/UmbracoExamine/packages.config
This commit is contained in:
Shannon
2016-04-27 14:30:10 +02:00
761 changed files with 9339 additions and 13176 deletions

View File

@@ -1286,6 +1286,30 @@ namespace Umbraco.Core
*/
}
public static string EscapeRegexSpecialCharacters(this string text)
{
var regexSpecialCharacters = new Dictionary<string, string>
{
{".", @"\."},
{"(", @"\("},
{")", @"\)"},
{"]", @"\]"},
{"[", @"\["},
{"{", @"\{"},
{"}", @"\}"},
{"?", @"\?"},
{"!", @"\!"},
{"$", @"\$"},
{"^", @"\^"},
{"+", @"\+"},
{"*", @"\*"},
{"|", @"\|"},
{"<", @"\<"},
{">", @"\>"}
};
return ReplaceMany(text, regexSpecialCharacters);
}
public static bool ContainsAny(this string haystack, IEnumerable<string> needles, StringComparison comparison = StringComparison.CurrentCulture)
{
if (haystack == null) throw new ArgumentNullException("haystack");