Newsgroups: comp.lang.ruby
From: Kyle Schmitt <kyleaschm...@gmail.com>
Date: Thu, 1 May 2008 09:46:38 -0500
Local: Thurs, May 1 2008 10:46 am
Subject: splitting with a regex & keeping a ref?
I'm writing some scripts to help handle some ornery samba servers we
have: part of that is unfortunately reading the config scripts that have built up over the years. I was hoping to use the standard string method as a quick & #the sample_data variable is defined below irb(main):sample_data.split(/(\[[a-z0-9]+\])/i) I know quite well I can zip through that array again, but I was Is there any way to do that that I'm just missing? Thanks, sample_data=%{[shop] You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||