using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^.+ (?:full|incr|manual) .+? (.+?) .*";
string substitution = @"$1";
string input = @"rspedw03.corpads.local 3085876532 JC_UNIX_FS01_INCR_DD2 JC_FS_DD2 UNIX_FS01_INCR_DD2 incr 02/23/2022 03/29/2022 03/29/2022 disk 1645592426 backup 3013 MB JCBDD2301P.CORPADS.LOCAL
rsuedw01.corpads.local 1020344 JC_DB_DB2 JC_DB Clone_DR full 02/23/2022 04/04/2022 04/04/2022 disk 1645592431 Clone_DR 997 KB MNBDD3302P.corpads.local
rsuedw01.corpads.local 1020344 JC_DB_DB2 full 02/23/2022 04/04/2022 03/30/2022 disk 1645592431 997 KB JCBDD1300P.corpads.local
rsuedw03.corpads.local 12608 MN_UNIX_NP_7_Days MN_DB Clone_DR full 02/23/2022 04/21/2022 04/21/2022 disk 1645592432 Clone_DR 13 KB JCBDD1300P.corpads.local
";
RegexOptions options = RegexOptions.Multiline;
Regex regex = new Regex(pattern, options);
string result = regex.Replace(input, substitution);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx