This would probably be better as a character group, ie:

```coffeescript
robot.hear /it['`]?s a trap\b/i, (msg) ->
```

That would avoid making it a capture group too.