B
Bruno Sousa
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 #<MatchData "Oct 22 06:25:35" 1:"22" 2:"06:25:35">
It should return #<MatchData "Oct 22 06:25:35" 1:"22" 2:"03:25:35">
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 #<MatchData "Oct 22 06:25:35" 1:"22" 2:"06:25:35">
It should return #<MatchData "Oct 22 06:25:35" 1:"22" 2:"03:25:35">