PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/self/root/opt/alt/ruby18/lib64/ruby/1.8/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/self/root/opt/alt/ruby18/lib64/ruby/1.8/eregex.rb

# this is just a proof of concept toy.

class RegOr
  def initialize(re1, re2)
    @re1 = re1
    @re2 = re2
  end

  def =~ (str)
    @re1 =~ str or @re2 =~ str
  end
end

class RegAnd
  def initialize(re1, re2)
    @re1 = re1
    @re2 = re2
  end

  def =~ (str)
    @re1 =~ str and @re2 =~ str
  end
end

class Regexp
  def |(other)
    RegOr.new(self, other)
  end
  def &(other)
    RegAnd.new(self, other)
  end
end

if __FILE__ == $0
  p "abc" =~ /b/|/c/
  p "abc" =~ /b/&/c/
end