.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.Collections.Generic;
using System.Linq;
					
public class Program
{
	public static void Main()
	{
		 string input = "PECVD_XL_XT_6_1_B9_PATCH.2".ToLower();
		 List<string> tokens = input.Split('_').ToList();
		 int buildIndex = tokens.FindIndex(s => s.StartsWith('b'));
		 if(buildIndex >= 2)
		 {
			List<string> releaseParts = tokens.GetRange(buildIndex - 2, 2);
			string release = string.Join("_", releaseParts);
			string build = tokens[buildIndex].TrimStart('b');
			int patchIndex = input.LastIndexOf('.');
			string patchNumber = patchIndex >= 0
				? input.Substring(++patchIndex) : null;
			 
			 Console.WriteLine($"Release: {release} Build: {build} PatchNumber: {patchNumber}");
		 }
	}
}
;