     url: "http://indicadoresdeldia.cl/webservice/indicadores.json"
     json: true
     transform: (body) ->
-      parseFloat body.indicador.uf.replace("$", "").replace(".", "").replace(",", ".")
+      parseFloat body.indicador.uf.replace(/[$.]/g, "").replace(",", ".")
   rp options
 
 process = (timeEntries, amount, price) ->

#
# Commands:
#   hubot toggl login <token> <password> - Login to Toggl
#   hubot toggl payment <amount> <price> <password> - Close time entries for the amount and price
#
# Author:
#   lgaticaq

    res.send "Processing time entries..."
    tags = ["Pagado"]
    action = "add"
    end = moment().toISOString()
    start = moment().subtract(1, "years").toISOString()
    user = robot.brain.userForName res.message.user.name
    encryptor = simpleEncryptor secret
    message = ""
    toggl = getClient encryptor.decrypt user.toggl.api_token
    toggl.getTimeEntriesAsync(start, end).then (timeEntries) ->
      process timeEntries, amount, price
    .then (data) ->
      message = "Ready#{data.difference}"
