fork(1) download
  1. def checkWords(target, text, numLeft = 2, numRight = 2)
  2. text[/#{"(\\S+) "*numLeft}#{Regexp.escape(target)}#{" (\\S+)"*numRight}/i]
  3. end
  4. puts checkWords('start', 'In software, a stack overflow occurs if the call stack pointer exceeds the stack bound. The call stack may consist of a limited amount of address space, often determined at the start of the program. The size of the call stack depends on many factors, including the programming language, machine architecture, multi-threading, and amount of available memory.')
Success #stdin #stdout 0.02s 9792KB
stdin
Standard input is empty
stdout
at the start of the