diff --git a/lib/tocer/parsers/header.rb b/lib/tocer/parsers/header.rb
index <HASH>..<HASH> 100644
--- a/lib/tocer/parsers/header.rb
+++ b/lib/tocer/parsers/header.rb
@@ -11,7 +11,7 @@ module Tocer
       end
 
       def prefix
-        String markdown[/#{PUNCTUATION}{1,}/]
+        String markdown[/#{PUNCTUATION}{1,}/o]
       end
 
       def content
diff --git a/spec/lib/tocer/cli_spec.rb b/spec/lib/tocer/cli_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/tocer/cli_spec.rb
+++ b/spec/lib/tocer/cli_spec.rb
@@ -128,13 +128,13 @@ RSpec.describe Tocer::CLI do
     shared_examples_for "a version command" do
       it "prints version" do
         result = -> { cli }
-        expect(&result).to output(/#{Tocer::Identity::VERSION_LABEL}\n/).to_stdout
+        expect(&result).to output(/#{Tocer::Identity::VERSION_LABEL}\n/o).to_stdout
       end
     end
 
     shared_examples_for "a help command" do
       it "prints usage" do
-        pattern = /#{Tocer::Identity::VERSION_LABEL}\scommands:\n/
+        pattern = /#{Tocer::Identity::VERSION_LABEL}\scommands:\n/o
         result = -> { cli }
 
         expect(&result).to output(pattern).to_stdout
Fixed Rubocop Performance/ConstantRegexp issues

Ensures regular expression isn't constructed more than once.