Advertisement
Shiny_

Untitled

May 5th, 2014
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.55 KB | None | 0 0
  1. on :message, WOLFRAM_REGEX do |m|
  2.             query = WOLFRAM_REGEX.match(m.message)[:query]
  3.             result = Wolfram.fetch(query)
  4.             sprintf "%s", result
  5.             gsub(" Clash  - Input nterpretation: ", "")
  6.             m.reply result.inspect[0 .. 300]
  7.                 .gsub("a:", "answer:")
  8.                 .gsub("Math\n", "")
  9.                 .gsub(/\bAdministrativeDivision,|Airport,|City,|MetropolitanArea,|Ocean \(|assumptions: |Clash, |SubCategory|\)|Input*interpretation:*?\b\i/, "")
  10.                 .gsub("\n", "")
  11.                 .gsub(/\banswer:*|   - Input: [\d\(\)\+\-\*\/\.][\d\(\)\+\-\*\/\.][\d\(\)\+\-\*\/\.]   - |\b\i/, "")
  12.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement