github/hubot — comment on commit fd0887f5c0d71557c307004e587b19757a330c1f
File:  line 0
By unixcharles:

Hmm, I see what you did there now.

Maybe this method should be call escapeRegexp, like `Regexp.escape` in Ruby.

I was thinking that talker won't accept anything but alphanumeric and _- characters, but it look like you're right.

here is the validation rule:

validates_format_of :name, :with => /\A[^[:cntrl:]\\<>\/&\s]*\z/,
:message => "should not contain non-printing characters \\, <, >, & and spaces"

You may want to avoid to escape chars that already illegal.

About `^`, mention are alway at the begin of the line, so It should alway match. `\b` match end of string, line change and space.