using System.Text.RegularExpressions;

namespace QC.QMSCT;

public class DelimiterParser
{
	public static MatchCollection ParseText(string Text, string Delimiters)
	{
		string pattern = string.Format("(^[^{0}]*(?=[{0}]))|((?<=[{0}])[^{0}]*)|(^[^{0}]*)", Delimiters);
		Regex regex = new Regex(pattern);
		return regex.Matches(Text);
	}
}
