using uCalcSoftware; var uc = new uCalc(); using (var t = new uCalc.Transformer()) { string logLine = """ 2024-10-26 10:00:05 INFO 192.168.1.10 "GET /api/users HTTP/1.1" 200 15ms """; // Define a pattern to capture the status and time string pattern = "{@String:request} {@Number:status} {@Number:time}ms"; // The replacement string formats the captured data for display // {request} or {request(1)} would return the string without surrounding quotes // {request(0)} returns the string with surrounding quotes string replacement = "Request: {request(0)}, Status: {status}, Time: {time}ms"; t.FromTo(pattern, replacement); // Use Filter() to extract only the transformed match Console.WriteLine(t.Transform(logLine).Matches); }