Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
Report abuse
1 2 3 4 5 6 7
def auto_bizman(text) if match = text.match(/.*?(@)((?:[_a-zA-Z0-9]+))(:|\s)/i) user = match[2] text.gsub! user, "<a href='#{app_url}#{user}'>#{user}</a>" end text end
Pasted November 12, 2007 5:19AM EDT
by winson
Embed
paste again
Ads from Ruby Row