diff --git a/MixItUp.Base/Model/Actions/SpecialIdentifierActionModel.cs b/MixItUp.Base/Model/Actions/SpecialIdentifierActionModel.cs index fed6a7fdb..700edcb9f 100644 --- a/MixItUp.Base/Model/Actions/SpecialIdentifierActionModel.cs +++ b/MixItUp.Base/Model/Actions/SpecialIdentifierActionModel.cs @@ -59,6 +59,15 @@ protected override async Task PerformInternal(CommandParametersModel parameters) } return Task.FromResult(text); }); + replacementText = await this.ProcessStringFunction(replacementText, "count", (text) => + { + string[] splits = text.Split(new char[] { ',' }); + if (splits != null && splits.Length == 2) + { + return Task.FromResult(Regex.Matches(splits[0], splits[1]).Count.ToString()); + } + return Task.FromResult(text); + }); } if (this.ShouldProcessMath)