I'm actually using using a command line tool called sox
to retrieve information about an audio file. This returns the following output:
Samples read: 449718
Length (seconds): 28.107375
Scaled by: 2147483647.0
Maximum amplitude: 0.999969
Minimum amplitude: -0.999969
Midline amplitude: 0.000000
Mean norm: 0.145530
Mean amplitude: 0.000291
RMS amplitude: 0.249847
Maximum delta: 1.316925
Minimum delta: 0.000000
Mean delta: 0.033336
RMS delta: 0.064767
Rough frequency: 660
Volume adjustment: 1.000
I'd like to extract the values out of this using a regular expression. So far I have /^Length \(seconds\):\s*[0-9.]*/m
which matches Length (seconds): 28.107375
but I just want the value.
What do I need to do?