String myString = 'This string has two 2s in it: 22'; Integer countOf2 = myString.countMatches('2');
Standard input is empty
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)
./prog:2: expected expression