in reply to @ ergular expression
Assuming you have a variable $str that contains 03:20:21 - PID: 11500 - kernel bitness: 64, you can output the desired string with the line:
print $str =~ /kernel bitness:\s(\d*)/;
If this does not work for you, post code and sample input and output so we can refine the approach. See perlretut for more guidance in constructing regular expressions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: @ ergular expression
by siddheshsawant (Sexton) on May 13, 2010 at 20:27 UTC | |
by kennethk (Abbot) on May 13, 2010 at 20:35 UTC | |
by siddheshsawant (Sexton) on May 13, 2010 at 20:59 UTC |