in reply to Re^2: @ ergular expression
in thread @ ergular expression
03:20:21 - PID: 11500 - kernel bitness: 64
but the term you are trying to match is
The kernel bitness: 64
My expression failed because your real input contained more spaces. The following modified version matches the new provided input:
print $str =~ /kernel bitness:\s*(\d*)/;
By adding the * modifier to \s it will now match any amount of white space. Again, see perlretut for more info.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: @ ergular expression
by siddheshsawant (Sexton) on May 13, 2010 at 20:59 UTC |