diff --git a/.sonarlint/connectedMode.json b/.sonarlint/connectedMode.json
new file mode 100644
index 0000000000000000000000000000000000000000..46281cbd0d5e6233b91d7bf7dd6edc37e93656b1
--- /dev/null
+++ b/.sonarlint/connectedMode.json
@@ -0,0 +1,4 @@
+{
+    "sonarQubeUri": "https://sonar.hedenstroem.com",
+    "projectKey": "go-snok"
+}
\ No newline at end of file
diff --git a/snok.go b/snok.go
index ccd27b90ac1c649b3fbda8602e67723432216efa..7a1328aa92b0966f29266762cb975b3e2130fb37 100644
--- a/snok.go
+++ b/snok.go
@@ -23,8 +23,8 @@ import (
 type test struct {
 	Name        string   `json:"name,omitempty"`
 	Args        []string `json:"args,omitempty"`
-	Input       *string  `json:"input,omitempty"`  // Todo: add support for URIs
-	Output      *string  `json:"output,omitempty"` // Todo: support regex and strings
+	Input       *string  `json:"input,omitempty"` // Todo: add support for URIs
+	Output      *string  `json:"output,omitempty"`
 	ExpectError bool     `json:"expectError,omitempty"`
 }
 
@@ -75,18 +75,7 @@ func (ct *CommandTest) testCmd(t *testing.T, cmd *cobra.Command, args []string)
 	args = append(args, cmd.Name())
 	containers, exists := cmd.Annotations["containers"]
 	if exists {
-		for _, container := range strings.Split(containers, ",") {
-			key := strings.TrimFunc(container, unicode.IsSpace)
-			if c, ok := ct.containers[key]; ok {
-				if !c.running {
-					t.Run("[Start "+key+"]", func(_ *testing.T) {
-						err := c.startFn(ct, t)
-						require.NoError(t, err, "Failed to start container: %s", key)
-					})
-					c.running = true
-				}
-			}
-		}
+		ct.startContainers(t, containers)
 	}
 	annotation, exists := cmd.Annotations["tests"]
 	if exists {
@@ -95,23 +84,7 @@ func (ct *CommandTest) testCmd(t *testing.T, cmd *cobra.Command, args []string)
 			err := json.Unmarshal([]byte(annotation), &tests)
 			require.NoError(t, err, "Malformed annotation: %s", annotation)
 			for _, test := range tests {
-				t.Run(test.Name, func(t *testing.T) {
-					var input io.Reader
-					if test.Input != nil {
-						input = strings.NewReader(*test.Input)
-					}
-					output, err := ct.executeCmd(append(args[1:], test.Args...), input)
-					if test.ExpectError {
-						require.Error(t, err, "Expected error")
-					} else if err != nil {
-						ct.handleUnexpectedError(t, err, "Unexpected error")
-					} else if test.Output != nil {
-						output = strings.TrimRightFunc(output, unicode.IsSpace)
-						r, err := regexp.Compile(*test.Output)
-						require.NoError(t, err, "Malformed regexp: %s", *test.Output)
-						require.True(t, r.MatchString(output), "Expected output to match %s, got %s", *test.Output, output)
-					}
-				})
+				ct.executeTest(t, test, args)
 			}
 		})
 	}
@@ -126,6 +99,46 @@ func (ct *CommandTest) testCmd(t *testing.T, cmd *cobra.Command, args []string)
 	}
 }
 
+func (ct *CommandTest) startContainers(t *testing.T, containers string) {
+	for _, container := range strings.Split(containers, ",") {
+		key := strings.TrimFunc(container, unicode.IsSpace)
+		if c, ok := ct.containers[key]; ok {
+			if !c.running {
+				t.Run("[Start "+key+"]", func(_ *testing.T) {
+					err := c.startFn(ct, t)
+					require.NoError(t, err, "Failed to start container: %s", key)
+				})
+				c.running = true
+			}
+		}
+	}
+}
+
+func (ct *CommandTest) executeTest(t *testing.T, test test, args []string) {
+	t.Run(test.Name, func(t *testing.T) {
+		var input io.Reader
+		if test.Input != nil {
+			input = strings.NewReader(*test.Input)
+		}
+		output, err := ct.executeCmd(append(args[1:], test.Args...), input)
+		if test.ExpectError {
+			require.Error(t, err, "Expected error")
+		} else if err != nil {
+			ct.handleUnexpectedError(t, err, "Unexpected error")
+		} else if test.Output != nil {
+			output = strings.TrimRightFunc(output, unicode.IsSpace)
+			if strings.HasPrefix(*test.Output, "/") && strings.HasSuffix(*test.Output, "/") {
+				expr := (*test.Output)[1 : len(*test.Output)-1]
+				re, err := regexp.Compile(expr)
+				require.NoError(t, err, "Malformed regexp: %s", expr)
+				require.True(t, re.MatchString(output), "Expected output to match %s, got %s", expr, output)
+			} else {
+				require.Equal(t, *test.Output, output, "Expected output %s, got %s", *test.Output, output)
+			}
+		}
+	})
+}
+
 func (ct *CommandTest) executeCmd(args []string, input io.Reader) (string, error) {
 
 	osStdout := os.Stdout                   // keep backup of the real stdout
@@ -152,6 +165,7 @@ func (ct *CommandTest) executeCmd(args []string, input io.Reader) (string, error
 	wg.Wait()
 
 	return output.String(), err
+
 }
 
 func getOrder(cmd *cobra.Command) int {
diff --git a/snok_test.go b/snok_test.go
index 02050a55276d74a2be4430ab109dd62a4f8c643a..b18c7994c509461fc0d17e9019a04bf730f0082f 100644
--- a/snok_test.go
+++ b/snok_test.go
@@ -58,7 +58,7 @@ var rootCmd = &cobra.Command{
 			{
 				"name": "Version",
 				"args": ["--version"],
-				"output": "^test version \\d+\\.\\d+\\.\\d+$"
+				"output": "/^test version \\d+\\.\\d+\\.\\d+$/"
 			}
 		]`,
 	},
@@ -73,7 +73,7 @@ var envCmd = &cobra.Command{
 			{
 				"name": "Check Container Message",
 				"args": ["TEST_MESSAGE"],
-				"output": "^testing$"
+				"output": "testing"
 			}
 		]`,
 	},
@@ -95,18 +95,18 @@ var echoCmd = &cobra.Command{
 			{
 				"name": "Echo",
 				"args": ["hello","world"],
-				"output": "^hello world$"
+				"output": "hello world"
 			},
 			{
 				"name": "Echo Reverse",
 				"args": ["-r","hello","world"],
-				"output": "^dlrow olleh$"
+				"output": "dlrow olleh"
 			},
 			{
 				"name": "Echo Input",
 				"args": ["-r","The","rain"],
 				"input": "in Spain falls mainly on the plain",
-				"output": "^nialp eht no ylniam sllaf niapS ni niar ehT$"
+				"output": "nialp eht no ylniam sllaf niapS ni niar ehT"
 			}
 		]`,
 	},