fork download
  1. String myString = 'This string has two 2s in it: 22';
  2. Integer countOf2 = myString.countMatches('2');
  3.  
Success #stdin #stdout #stderr 0.02s 10508KB
stdin
Standard input is empty
stdout
Object: String error: did not understand #myString
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
String class(Object)>>doesNotUnderstand: #myString (SysExcept.st:1448)
UndefinedObject>>executeStatements (prog:1)
Object: nil error: did not understand #associationAt:ifAbsent:
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
UndefinedObject(Object)>>doesNotUnderstand: #associationAt:ifAbsent: (SysExcept.st:1448)
DeferredVariableBinding>>resolvePathFrom: (DeferBinding.st:115)
DeferredVariableBinding>>value (DeferBinding.st:69)
UndefinedObject>>executeStatements (prog:2)
stderr
./prog:2: expected expression