[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: a regex

Cameron, Gemma (UK)

10/27/2006 2:34:00 PM


What exactly do you want from the regex?

Do you want to split the string into 3 variables?

i.e. string = 2006%2F10%2Fasdfasdf
year = 2006
day = 10
text = asdfasdf

Or are you wanting to find a regex that would match everything but the
%2F?

Gem

-----Original Message-----
From: Alexandru Popescu [mailto:the.mindstorm.mailinglist@gmail.com]
Sent: 27 October 2006 14:24
To: ruby-talk ML
Subject: a regex

*** WARNING ***

This mail has originated outside your organization, either from an
external partner or the Global Internet.
Keep this in mind if you answer this message.

Hi!

I have a string in the following form: 2006%2F10%2Fasdfasdf (or more
generic: any_characters+%2Fany_characters+%2Frest_of_it). I am wondering
if I can retrieve the groups 2006, 10, asdfasdf thru a regex (I confess
I couldn't figure it out so far :-( ).

many thanks,

/alex
--
w( the_mindstorm )p.





********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************