You need to add some extra code, e.g.
read the scene name
then split it at the space etc etc
name="Scene 2 1;00pm"
splitname=name.split(" ") ###>>> ["Scene", "2", "1;00pm"]
timestring = splitname[2] ###>>> "1;00pm"
###delete the ;
timestring.gsub!(/[;]/, "") ###>>> "100pm"
###now check if pm
if timestring=~/pm$/
timestring.gsub!(/pm$/, "")
time_num=timestring.to_i + 1200 ###>>> 100 >>> 1300
timestring=time_num.to_s
###
elsif timestring=~/am$/
timestring.gsub!(/am$/, "") ###>>> 100
end
name=splitname[0]+" "+splitname[1]+" "+timestring ### modify name >>> "Scene 2 1300"
###
### now rename that scene with the modified name etc...
###
To strip off the entire 'Scene N ' part just use:
name=timestring ### modify name >>> "Scene 2 1;00pm" >>> "1300"