I wish to find a match of *|END_OF_PARAM|ABC_XYZ_123.txt in a given string (meaning string starts with anything but containing |END_OF_PARAM| followed by a filename(which has alphabets, numbers, _ ,-) and ending in ".txt").
eg:
string input = "| AB|3|20200914-01|5| | |END_OF_PARAM|ABC-XYZ-20200914-PIA-03_05_20200914132900.txt";
string pattern = @"*/([A-Za-z0-9\-]+)\.txt$" // What exactly should go here?
Match match = Regex.Match(input, @"*/([A-Za-z0-9\-]+)\.txt$",
RegexOptions.IgnoreCase);
if (match.Success)
{
Console.WriteLine("Match!"));
}
Output I need is ABC-XYZ-20200914-PIA-03_05_20200914132900.txt
ps : Somelines end with |END_OF_PARAM| and don't have the filename after them, such lines should be ignored.
I don't know much of RegEx, tried to learn it and get my task done but it's taking longer than expected. Let me know if any additional data is needed. Thank you.

^.*(\|END_OF_PARAM\|[\w-]+\.txt)$regex101.com/r/F2Kl3G/1Regex.Matches(text, @"(?<=\|END_OF_PARAM\|)[A-Za-z0-9_-]+\.txt(?=\r?$)").Cast<Match>().Select(x => x.Value)