From: Bruno Sousa Date: 2010-10-26T22:47:51+09:00 Subject: Change captured values in a regexp Hi everyone! Supposing there is a string like this: Oct 22 06:25:35 machine kernel: [271182.956004] IN= OUT=eth0 SRC=10.8.0.248 DST=192.5.5.241 I am using the following regexp to capture time: /Oct (\d{2}) (\d{2}:\d{2}:\d{2})/ How can I alter the hour value only and keep it in the result returned? I want to decrease 3 hours. Instead of # It should return # -- Posted via http://www.ruby-forum.com/.