Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How can I match between two integer numbers

by davorg (Chancellor)
on Jan 02, 2003 at 12:15 UTC ( [id://223757]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://223757]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 18:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found