Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6985

Convert MatchData to Integer

Newsgroups comp.lang.ruby
Date 2014-06-02 13:07 -0700
Message-ID <6d4b5bb3-7b43-4222-8924-504b04f1bd6c@googlegroups.com> (permalink)
Subject Convert MatchData to Integer
From qoexcel@gmail.com

Show all headers | View raw


Hi Everyone,i want to get integer from string, something like this:      
           
           <Loading DOM finished: 41 ms>  

using command            /\d+/.match(self.loadDOMstat)          
            
, but actually i don't have integer, i have MatchData .  
How can i convert MatchData to integer in Ruby?Moreover you can give me a hint, how to get number  from this string..  
Thank you in advance!!!    

Back to comp.lang.ruby | Previous | NextNext in thread | Find similar


Thread

Convert MatchData to Integer qoexcel@gmail.com - 2014-06-02 13:07 -0700
  Re: Convert MatchData to Integer Robert Klemme <shortcutter@googlemail.com> - 2014-06-02 22:11 +0200
    Re: Convert MatchData to Integer qoexcel@gmail.com - 2014-06-03 03:22 -0700
      Re: Convert MatchData to Integer Michael Uplawski <michael.uplawski@uplawski.eu> - 2014-06-03 19:51 +0200
      Re: Convert MatchData to Integer Robert Klemme <shortcutter@googlemail.com> - 2014-06-03 22:53 +0200

csiph-web