fork download
  1. regex1 = /[^a]*|[^a]*a[^b]*/
  2. regex2 = /[^a]*|[^a]*a[^b]*|[^a]*a[^b]*b[^c]*/
  3.  
  4. puts regex1.match("AB")
  5. puts regex1.match("ab")
  6. puts regex2.match("ABC")
  7. puts regex2.match("abc")
  8.  
Success #stdin #stdout 0.01s 6364KB
stdin
Standard input is empty
stdout
AB

ABC