[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: regex help please - parsing an Excel Range
From: Todd Burch <promos () burchwoodusa ! com>
Date: 2007-07-17 12:52:11
Message-ID: 03245073314e4fe9b36f0b249a5bc778 () ruby-forum ! com
[Download RAW message or body]
Phil Meier wrote:
> You can have this in one RegEx:
>
> addr = "$G$28:$I$28"
> addr =~ /:\$*([A-Z])+\$*(.*)$/
> puts "row=#{$2}, col=#{$1}" # -> row=28, col=I
>
> An addr = "G28:I28" would also be accepted by the RegEx.
Works perfect Phil. Thanks! Todd
--
Posted via http://www.ruby-forum.com/.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic