Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save NaibafCH/23db25fe8c1fea3cfd53f2221a8ab2ce to your computer and use it in GitHub Desktop.
Save NaibafCH/23db25fe8c1fea3cfd53f2221a8ab2ce to your computer and use it in GitHub Desktop.
using System.Text.RegularExpressions;
using Sitecore.Mvc.Pipelines.Response.GetDynamicPlaceholderInitialKey;
namespace Foundation.DynamicPlaceholder.Pipelines.GetDynamicPlaceholderInitialKey
{
public class RemovePlaceholderUniqueKeySuffixWithCountOrId : RemovePlaceholderUniqueKeySuffix
{
private static readonly Regex DynamicPartMatcherWithId =
new Regex("-{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}}-([0-9]+|{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}})$", RegexOptions.Compiled);
public RemovePlaceholderUniqueKeySuffixWithCountOrId()
{
DynamicPartMatcher = DynamicPartMatcherWithId;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment