Dear All,
I have a lines written in my file like this
REMARK 2 RESOLUTION. 3.10 ANGSTROMS.
REMARK 2 METHOD X-RAYS
REMARK 3 SOMETHING ELSE
Now I want to have a matching statement which will match a line containing REMARK 2 RESOLUTION. and will extract 3.10 from this.
3.10 is a changeable value it could be 2.80, 2.10, 2.25, 2.40 in REMARKS 2 so I want to extract this value .
I tried
but it is printing the whole line, I am only interested in the value 3.10
Regards.
I have a lines written in my file like this
REMARK 2 RESOLUTION. 3.10 ANGSTROMS.
REMARK 2 METHOD X-RAYS
REMARK 3 SOMETHING ELSE
Now I want to have a matching statement which will match a line containing REMARK 2 RESOLUTION. and will extract 3.10 from this.
3.10 is a changeable value it could be 2.80, 2.10, 2.25, 2.40 in REMARKS 2 so I want to extract this value .
I tried
Code:
if($_=~ /RESOLUTION[.] [\d]*[\s\S]*ANGSTROMS/g){
print $_;
}
but it is printing the whole line, I am only interested in the value 3.10
Regards.