Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Regular Expressions need help with ':' 's
I am trying to use regular expressions to remove the information from a line read in from a text file, but keep hitting a problem when i hit the string 00:00:04.
The compleate line is eg:
root 1 0 0 Feb17 ? 00:00:04 init 
I just want the parts "root 1 init"
So i use the line
$line =~/^s*(w+)s*(d+)s*d*s*d*s*w+s*d+s* this is where the problem starts next part of line is 00:00:04
Can anyone fix this for me or show me how to get round the ':' problem
0 · ·