I hope I'm speaking for others on this list, but jumping on somebody with an RTFM answer is extremely inappropriate.
You can simply suggest they pick up either a copy of Ruby in a Nutshell ( by Matz ) ... or Programming Ruby 2nd Ed ( by Dave Thomas ).
It is completely agreed that there are many ways the OPer could have found the information, but they came here for help, not to get cussed at.
It'd be a real turn off to me if I were still green @ this if people responded to my questions like that.
Anyways, like I said, I *hope* I was responding appropriately in this. If not, somebody will bite me for overstepping.
j.
On 10/1/05, Alexey Verkhovsky <[EMAIL PROTECTED]> wrote:
Max Kononovich wrote:
> Is anybody know how to get digital id having the string
> " http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14"
> I mean that I need for "14". It is very important for me. Please help.
RTFM about regular expressions - they are your best friend for tasks
like this.
irb:001:0> s = "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14"
=> " http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14"
irb:002:0> i = s.gsub(/^http:.*\?menu_id=(\d+)$/, '\1')
=> "14"
---
Alexey Verkhovsky
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
--
"http://ruby-lang.org -- do you ruby?"
Jeff Wood
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
