```ruby
module Regexpert
  class Generator
    attr_accessor :regex

    def initialize(regex)
      @regex = Regexpert::Regex.new(regex)
    end

    def generate!
      expression = regex.to_s
      str   = ""

      str << regex.split.each do |el|
        expr = Regexpert::Regex.matchers.find {|exp, val| el.match(exp) } ? expr.last : el
      end

      str
    end
  end
end
```

Revert accidental commit that broke stuff
user
```ruby
module Regexpert
  class Generator
    attr_accessor :regex

    def initialize(regex)
      @regex = Regexpert::Regex.new(regex)
    end

    def generate!
      expression = regex.to_s
      str   = ""

      regex.split.each do |el|
        if expr = Regexpert::Regex.matchers.find {|exp, val| el.match(exp) }
          str << expr.last
        else
          str << el
        end
      end

      str
    end
  end
end
```
assistant