http://qs1969.pair.com?node_id=223757


in reply to How can I match between two integer numbers

This seems to give the answers you want

/^\s+\d+\s+(.*?)\s+\d+\s+(.*?)$/;

It's worth looking at the $`, $& and $' variables to help you debug regular expressions.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re:^2 How can I match between two integer numbers
by ph0enix (Friar) on Jan 02, 2003 at 13:20 UTC

    If he want match also leading space (" 4.393864E+00 .0" instead of "4.393864E+00 .0") I suggest

    /^\s+\d+\s(.*?)\s+\d+\s(.*?)$/
Re: Re: How can I match between two integer numbers
by talexb (Chancellor) on Jan 02, 2003 at 16:13 UTC
      It's worth looking at the $`, $& and $' variables to help you debug regular expressions.

    It's relavant to note that the speed of the regexp code in Perl decreases when these variables are used.

    --t. alex
    Life is short: get busy!

      Absolutely. Use them for debugging, but don't use them in production code - unless you really need to :)

      --
      <http://www.dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg