fork(7) download
  1. s = "-#test--#"
  2. key = "test-"
  3. rx = /(?<!\w)#{Regexp.escape(key)}(?!\w)/
  4. puts (s =~ rx) != nil
Success #stdin #stdout 0s 28688KB
stdin
Standard input is empty
stdout
true