I want to construct a regular expression that will, for every line of text input I give it, pick out what XX, YY, and ZZ are, preferably returning the values to me in variables that I can add up or put in an array or whatever.
The thing is I’m fairly new to both regular expressions and shell scripting (I will be using csh for this task). So I was wondering how to do this with csh regex, and if it’s different than say perl regex.
Just to reiterate the pattern is as follows:
Some text repeating: 23h04m31s
...
Some text repeating: 12h13m22s
...
EDIT – my script will need to look into particular files for this. I’m thinking I can use the GREP tool in my csh script, with the correct regex.
Thank you for any help!
1 Answer