I'd like to use Sed to find within a template.php file the unix timestamp portion of the name of a JS file and replace it with a current timestamp. The old timestamp will vary so I need a regex to match a number.
Here's what I have so far:
TimPeterson$ current_timestamp=date +%s
TimPeterson$ sed -i "" "s/myJS-[0-9]*\([0-9]\+\).js/myJS-$current_timestamp.js/" template.php
Just to be clear on the problem, what I need to match in the JS file name looks something like this (where the number part is variable):
myJS-1361297970.js
However, [0-9]*\([0-9]\+\)
isn't correct.