Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t As New uCalc.Transformer()
      '// Pattern: Match "Log:", an optional level, and the message.
      '// Replacement: Use `{!level:INFO}` to insert 'INFO' if {level} is empty.
      t.FromTo("Log: [{level: ERROR | WARN}] {msg}",
      "Status:{!level:INFO}{level} | Msg:{msg}")
      
      '// Case 1: Level is present
      Console.WriteLine(t.Transform("Log: ERROR File not found"))
      
      '// Case 2: Level is missing, so the fallback is used
      Console.WriteLine(t.Transform("Log: System started successfully"))
   End Sub
End Module